System Debug Reference Manual (32650-90888)
Chapter 3 53
System Debug Interface Commands and Intrinsics
Debug Interfaces
Debug may also be invoked with the HPDEBUG/DEBUG intrinsic calls from within any
program. Native mode programs enter Debug assuming that the user will be viewing the
native mode environment (program, stack, registers); this is referred to as NM Debug.
Compatibility mode programs enter Debug assuming that the user will be viewing the
compatibility mode environment; this is called CM Debug.
Process Abort Calls
You may arm a call to Debug which occurs in the event of a process abort. The call may be
armed by:
• The SETDUMP command.
• The SETDUMP intrinsic.
• The HPSETDUMP intrinsic.
Once a SETDUMP command or intrinsic has been issued, all new processes created are
affected. Both the setdump attribute and the DEBUG command string are inherited by new
child processes. This feature may be disarmed by the following:
• The RESETDUMP command.
• The RESETDUMP intrinsic.
• The HPRESETDUMP intrinsic.
If the Debug process abort call has not been armed through one of the SETDUMP interfaces,
and a process abort occurs, an abbreviated stack trace is produced. This abbreviated trace
shows only the most recently called procedure in the program file and in each library being
used. This is done for both the CM and NM stacks.
The following is an example of a CM program aborting without invocation of SETDUMP.
:run cmbomb
**** PROGRAM ERROR #4 :INTEGER DIVIDE BY ZERO
ABORT: CMBOMB.DEMO.TELESUP
**** PROCESS ABORT TRACE ****
NM SYS a.006d7798 dbg_abort_trace+$30
CM SYS % 27.261 SWITCH'TO'NM'+4 SUSER1
CM PROG % 0.1215 TEST_ARITH_TRAP+24 SEG'
PROGRAM TERMINATED IN AN ERROR STATE. (CIERR 976)
:
The following example is the same as above except that the code was compiled with a
native mode compiler.
:run nmbomb
**** Integer divide by zero (TRAPS 30)
ABORT: NMBOMB.DEMO.TELESUP
**** PROCESS ABORT TRACE ****
NM PROG 191.00006b20 test_arith_trap+$28