Some diagnostic or debugging tools which are used to analyze an executable, are executables themselves (e.g. strace or gdbserver). Integrating e.g. /usr/bin/strace into an MSRA StartupConfig requires following steps:

  1. Configure the path to diagnostic/debugging tool using ExecutableLocation model extension as described in chapter Configurable Executable Path for Applications.
  2. Now Execution Manager will start /usr/bin/strace instead of the application app_A.
  3. Modify the ARXML file and add the necessary command line arguments for the diagnostic or debugging tool (e.g. for strace add the path to the executable to be started and its parameters).

   <PROCESS-ARGUMENTS>

     <PROCESS-ARGUMENT>

       <ARGUMENT><absolute_path>/app_A</ARGUMENT>

     </PROCESS-ARGUMENT>

   </PROCESS-ARGUMENTS>

  1. ApplicationClient process is expected to report its PID to Execution Manager and a check is being made to ensure that this ApplicationClient is reporting from the correct process. In case of using debugging tool parent process, ApplicationClient will report PID of child process, which Execution Manager is not aware of. This requires ApplicationClient Identity Verification to be disabled.
  2. To disable this verification, set Tool Process’s model extension peerIdentificationDisabled to TRUE.

   <SHORT-NAME>wrapper_test_process</SHORT-NAME>

   <ADMIN-DATA>

     <SDGS>

       <SDG GID="DvMex:PeerIdentificationDisabled">

         <SD GID="peerIdentificationDisabled">TRUE             </SD>

       </SDG>

     </SDGS>

   </ADMIN-DATA>

  1. Optional: Debugging tools will likely increase the startup time of the process, therefore you might have to increase the timeout values within the configuration of the process you want to debug, otherwise Execution Manager's timeout violation handling will be triggered. The example below defines 20 seconds for the enter and exit timeout.

   <TIMEOUT>

     <ENTER-TIMEOUT-VALUE>20</ENTER-TIMEOUT-VALUE>

     <EXIT-TIMEOUT-VALUE>20</EXIT-TIMEOUT-VALUE>

   </TIMEOUT>

With these steps the Adaptive Application is started by the diagnostic/debugging tool and in case of strace system calls are printed to the terminal.