Debug Manual

Table Of Contents
Introduction
Debug Manual421921-003
1-4
Calling Debug From a Process
contains CALLABLE or PRIV procedures) can be put into debug state only by the
local super ID.
If a process is created privileged, it will never run unprivileged, so DEBUG would
be ineffective; therefore, DEBUG is rejected for an initially privileged process. Use
DEBUGNOW instead.
cpu,pin
is the processor in which the program to be debugged is executing and its process
identification number.
process-name
is the process name of the program to be debugged. If you use the process-name
form, the primary process of a process pair enters the debug state.
TERM [[\sys-name.]$terminal-name [.#qualifier ]]
TERM specifies the new home terminal of the process being debugged. If you omit
TERM, Debug prompts appear on the original home terminal of the process. If you
specify TERM but omit the terminal name, Debug uses the terminal from which you
just entered this command. You must include the \sys-name if the new home
terminal is connected to a system other than the current default system.
Example:
(BREAK key pressed)
20> STATUS *,TERM
Process Pri PFR %WT Userid Program file Hometerm
$Z159 1,152 123 R 000 9,215 $VOL1.SV1.POBJ $T1
.
.
21> DEBUG 1,152
DEBUG $PC=0x7000D820
106,01,00152-
Calling Debug From a Process
Programs can include explicit calls to a debug facility. This method is quite useful for
finding elusive error conditions. The procedures that call a debug facility invoke either
Debug or the Inspect debugger depending on which debugger has been previously
selected. These procedures can invoke the debug state for the current process or the
designated process. The procedures are:
DEBUG procedure, which invokes Debug for the current process
PROCESS_DEBUG_ procedure, which can invoke Debug for either the current
process or the called process
DEBUGPROCESS procedure, which invokes Debug for the specified process