C/C++ Programmer's Guide (G06.25+)
Running and Debugging C and C++ Programs
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
19-12
Debug
•
Native Inspect on H-series systems
•
The Visual Inspect debugger
The following subsections introduce some of the features of each debugger.
Debug
Debug provides machine-level process debugging; that is, it provides access to a
process in terms of code and data addresses, hardware registers, and other machine-
level quantities. To use Debug, you should have a thorough understanding of the HP
NonStop architecture as described in the system description manual that corresponds
to your NonStop system, such as the NonStop S-Series Server Description Manual.
For more information about Debug, refer to the Debug Manual.
Inspect
The Inspect symbolic debugger provides both machine-level and source-level process
debugging.
If you compile your TNS or TNS/R native program using the SYMBOLS pragma, you
can use the source-level mode of the Inspect debugger to access your process in
terms of variables, functions, statements, and other source-level entities. In addition, if
you have a thorough understanding of the HP NonStop architecture, you can use the
machine-level mode of the Inspect debugger to access hardware registers and other
machine-level quantities.
If you compile your program using the SAVEABEND pragma, the system automatically
creates a save file, or snapshot, of your running program if it terminates abnormally.
You can then use Inspect to examine the save file and diagnose the cause of the
abnormal termination.
To debug PIC (Position-Independent Code) on a G-series system, you must use Visual
Inspect. To debug any native code file on an H-series system, you must use Visual
Inspect or Native Inspect.
You can use Inspect on both TNS and TNS/R programs. On H-series systems, you
cannot use Inspect on TNS/E programs.
For more information about the Inspect debugger, refer to the Inspect Manual.
Native Inspect
Native Inspect is a symbolic debugger for H-series systems and is based upon the
open-source GNU dbg utility. Native Inspect provides both machine-level and source-
level process debugging.
If you compile your TNS/E native program using the SYMBOLS pragma, you can use
the source-level commands to access your process in terms of variables, functions,
statements, and other source-level entities. In addition, if you have a thorough
understanding of the HP NonStop architecture, you can use the machine-level