System Debug Reference Manual (32650-90888)

62 Chapter3
System Debug Interface Commands and Intrinsics
HPSETDUMP Intrinsic
HPSETDUMP Intrinsic
Arms a call to Debug which takes place during abnormal process termination.
Callable from: NM
Syntax
HPSETDUMP (
status, cmdstr
);
Parameters
status
32-bit signed integer (optional)
The status returned by the HPSETDUMP intrinsic call. The variable is a
record containing two 16-bit fields, with the error number in the
high-order 16 bits and the intrinsic subsystem number in the low-order
16-bits.
cmdstr
character array (optional)
A packed array of characters (up to 255 bytes) that contains the DEBUG
commands to be executed if the process aborts. The first character in the
array is recognized as the command delimiter. The last character in the
command string must be immediately followed by the same delimiter.
Discussion
The HPSETDUMP intrinsic enables automatic execution of a set of Debug commands when a
process terminates abnormally (aborts). This intrinsic affects the current process, child
process, and any generation grandchild processes subsequently created by the calling
process. That is, the Setdump attribute and
cmdstr
is inherited by any new child process
and all generations thereafter.
Debug executes the commands in
cmdstr
and sends the output to the standard list file
($STDLIST). Any commands which require input generate an error message.
If the process that aborts is being run from a job, the process terminates after executing
the command string. If the process is being run from a session, then after the specified
command string has been executed, Debug stops to accept interactive commands with I/O
performed at the user terminal, contingent upon the following requirements:
The abort did not occur while in system code, and
The process entered the abort code through a native mode interrupt. Such aborts are
typically caused by arithmetic and code-related traps (refer to the XARITRAP and
XCODETRAP intrinsics).
NOTE
CM programs usually fail these tests.
Once Debug accepts interactive input, the user is free to enter any Debug command. The