Using SoftBench Debugger

Debugging After a Program Fails (Core Dump)

Debugger sets the PC to the line that caused the core dump. The stack and all variables appear as they were when the program was about to execute that line. Here are some useful SoftBench Debugger actions that help find problems:

Examine the line in the Source File Area that was responsible for the core dump to look for an obvious problem.

Enter a local or global variable in the "()" input box, then select Print ( ) to examine its value. Check for a value out of range.

Choose "Show: Stack…" to look at the procedure call stack. Check values of passed parameters to see if the problem originated earlier in your program.

Choose "Show: Assembly Instructions…", and examine CPU registers or assembly instructions to get a low-level view of your program (see “Viewing Assembly Language and CPU Registers” on page 211).

You can often determine your program's problem using this information without actually executing the program again. If that's not possible, you can use these hints to set up breakpoints and tracing, and execute your program under SoftBench Debugger control.

218

Chapter 7

Page 218
Image 218
HP UX SoftBench Software manual 218