TAL Programmer's Guide
Debugging Programs
Running and Debugging Programs
16–8 096254 Tandem Computers Incorporated
Running a Sample Inspect Session
The step numbers in the following Inspect session correspond to the interactive
operations shown in Figure 16-3. In the figure, commands you enter are shown in
boldface.
1. To run your program in an Inspect session, enter the TACL RUND command at
the TACL prompt. Specify the name of your object file and any appropriate run
options. For the sample session, specify MYPROG:
RUND myprog
The Inspect product suspends program execution before the first instruction. An
Inspect header message and prompt appears. The prompt consists of the object
file name enclosed in hyphens if your program has symbols (or underscores if it
has no symbols).
2. You can set breakpoints at points where you want the program to pause. For the
sample session, set a breakpoint at edit line 21, which is the END of the program:
BREAK #21
An Inspect message indicates the number, type, and location of the breakpoint.
The breakpoint will suspend execution before edit line 21 executes.
3. To run your program until the breakpoint, enter the RESUME command at the
Inspect prompt:
RESUME
When a breakpoint occurs, the program suspends execution. An Inspect message
identifies the breakpoint.
4. You can now display object values or clear and set breakpoints. Normally, you
can resume execution or step through the program until it reaches another
breakpoint.
For the sample session, display the value of variable TOTAL:
DISPLAY total
An Inspect message shows the value of TOTAL.
5. Normally, after your program executes correctly, you clear all breakpoints (for
example, by issuing the CLEAR * command). For the sample session, clear the
breakpoint by specifying its number:
CLEAR 1
An Inspect message tells you the breakpoint is cleared.
6. You can now stop the Inspect session and return to the TACL prompt. (In high-
level mode, do not abbreviate the STOP command.)
STOP