C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

These 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 details about Debug, see 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 use Inspect to
examine the save file and diagnose the cause of the abnormal termination.
To debug PIC (Position-Independent Code) on a TNS/R system, you must use Visual Inspect. To
debug any native code file on a TNS/E system, you must use Visual Inspect or Native Inspect.
You can use Inspect on both TNS and TNS/R programs. You cannot use Inspect on TNS/E
programs.
For more details about the Inspect debugger, see the Inspect Manual.
Native Inspect
Native Inspect is a symbolic debugger for TNS/E 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 commands to access registers, code and data segments, stack, and
other machine-level entities.
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 use Native
Inspect to examine the save file and diagnose the cause of the abnormal termination.
For more details about Native Inspect, see the Native Inspect Manual.
Native Inspect is also integrated with NSDEE when you have installed NSDEE Core with Debugging
(see “NSDEE” (page 312)).
Visual Inspect Symbolic Debugger
Visual Inspect is an optional HP PC-based (GUI) symbolic debugger designed to work in complex
distributed environments. Visual Inspect provides only source-level debugging for servers executing
in the NonStop environments.
Visual Inspect is a client-server application; the server runs on the HP NonStop platform, and the
client runs on the PC. Visual Inspect is also integrated into the HP Enterprise Tool Kit on the PC.
As when using the Inspect or Native Inspect symbolic debuggers, you must use the SYMBOLS
pragma to enable the inclusion of symbol information in your object file and you should not strip
Debugging C and C++ Programs 327