DebuggingLast update on Friday, 28-Jul-2006 16:20:27 CDT. | |||
DebuggingThis subsection of necessity contains a summary account on core debugging. The "General Programming Concepts: Writing and Debugging Programs" guide from IBM is another good resource for these and other topics. dbx, pdbxThe serial command-line IBM debugger is called dbx. The parallel command-line IBM debugger is called pdbx. idebugVisualAge C++ and C for AIX come with the graphical debugger called idebug. Under some situations, xlf compiled code will not work properly with idebug. Debugging in Batch JobsIf the problem only arises after the program runs for a long time, or in a case where large amounts of memory is used, interactive debugging does not remain possible. In this case, you wish to capture the core file and run the debugger in a batch job. Saving the Core FileTo save the core file, check for existence of core file once your program terminates. Example Job File (captures the core file)
Running debugger in batch modeCreate a debugger command file (call "dbx.commands") Example "dbx.commands" File
The batch job should be similar to the following
The job's output file (debug.out) will contain the results of the "where" and "dump" commands given to "dbx". As the user finds more information, he can add more commands in "dbx.commands" file to pin-point the cause of the error. |