Debug Manual

Table Of Contents
Introduction
Debug Manual421921-003
1-7
Why a Process Enters Debug
3. When linking the program object file, specify the nld or Binder command
SET INSPECT OFF. Note that the command SET SAVEABEND ON also sets
INSPECT ON. You might want to ensure that the command
SET SAVEABEND OFF is also specified. If the program object file has already
been created, you can accomplish the same thing by specifying the nld or Binder
commands CHANGE INSPECT OFF and CHANGE SAVEABEND OFF for the file.
For more information on nld commands, see the nld Manual and the noft Manual.
For more information on Binder commands, see the Binder Manual. For more
information on compiler directives, see the reference manual for the particular
compiler.
Why a Process Enters Debug
There are several reasons a process might unexpectedly enter Debug by default:
The process tried to call an undefined external procedure.
The process called the DEBUG procedure.
Another process specified the process in a call to the DEBUGPROCESS or
PROCESS_DEBUG_ procedure.
In the case of a TNS/R native process, the process received a signal and either the
installed signal action was SIG_DEBUG or a user-supplied signal handler invoked
Debug.
In the case of a TNS/R native process that previously had been in the debug state,
the installed signal action is SIG_DFL and the process received a signal for which
the SIG_DFL action is normally process termination. For such a process, the
SIG_DFL action for these signals becomes invocation of Debug. (This applies to
all native signals and to most OSS signals.)
In the case of a TNS process, a trap occurred and the process had previously
neither specified its own trap-handling mechanism nor disabled traps by a call to
the ARMTRAP procedure.
How to Determine Process State on a Trap or
Signal
If a TNS process enters Debug because a trap occurred, Debug automatically displays
the number of the trap. The trap numbers that can be displayed are:
Trap Number Trap Condition (page 1 of 2)
0 Illegal address reference
1 Instruction failure
2 Arithmetic overflow
3 Stack overflow