Debug Manual

Table Of Contents
Introduction
Debug Manual421921-003
1-13
How to Use Debug
- TRAP #nn -
The process encountered a trap, number nn, and no trap handler was specified for
the process.
How to Use Debug
Once your process enters Debug, use the commands in Section 4, Debug Commands,
to find out what is happening. You use Debug interactively by entering the Debug
commands at the process’ home terminal.
With Debug it is possible to establish one or more breakpoints, to display and modify
the contents of variables, and to display and modify the contents of specified registers.
It is also possible to trace and display stack markers, to calculate the value of
expressions, and to redirect the Debug display to an output device.
Example of Debug Use
The following sample Debug session shows commands that display and modify the
contents of a memory location, set a breakpoint, and resume program execution. The
commands entered by the user are in bold so you can distinguish them from the Debug
output.
DEBUG P=%001025, E=%000017, UC.%00 ! Debug header message.
106,01,00012-D 14,2 ! Display 2 words starting at user data loc. %14.
000014: 020040 020040
106,01,00012-M 14,0 ! Modify user data loc. %14 by storing 0.
106,01,00012-B 1027 ! Set breakpoint at %001027
! in current code segment.
ADDR: UC.%00, %001027 INS: %127001
106,01,00012-R ! Resume program execution.
Program execution resumes.
Debugging on a Remote Node
Debug allows debugging from a remote node for two nodes connected in a network.
From the terminal on your node, you can run a process on another node and debug it,
or a process can be run or a new process started with a home terminal specified on
another node. Debugging on a remote node is illustrated in Figure 1-2 on page 1-14.
Note. Unless you specify otherwise (either in the command itself or by using a BASE
command), numeric values input to or output by Debug are in hexadecimal representation for
commands referencing RISC addresses and in octal for commands referencing TNS
addresses, except for the Debug prompt, where sys, cpu, and pin are in decimal.