Debugging hints for diagnostic applications
The Diagnostic Controller uses the process ID (PID) of the DA to determine which TMInput object class entry to use for the DA during execution.
To debug the DA, run the following:
export DIAG_DEBUG=1
- Run diagnostics as usual against your resource once.
odmget TMInput > /tmp/tminput.add # save off contents of TMInput.
- Edit the /tmp/tminput.add file and set the pid field
to 0.
odmdelete -o TMInput # delete what is currently in TMInput. odmadd /tmp/tminput.add # add new contents of TMInput.
- Execute the code debugger against the DA.
If the Diagnostic Application uses a kernel extension or Second Level Interrupt Handler, you may have to perform the following before trying to load and debug the DA.
- Load the kernel extension. This can be done by running diagnostics once on the device, and then exiting. The Controller will normally load any kernel extensions needed by the DA. When exiting Diagnostics, the Controller does not unload the extensions, so it should still be loaded during the debugging,
- Export the diagnostic environment variable DIAGX_SLIH_DIR to /usr/lpp/diagnostics/slih.