TAL Programmer's Guide
Debugging Programs
Running and Debugging Programs
16–4 096254 Tandem Computers Incorporated
Debugging Programs You can use the Inspect or Debug product to debug your program. Debug is the
default debugger on the system; however, it displays values only by machine address
and only in octal or ASCII base. For symbolic debugging, you can use the Inspect
product.
Using the Inspect Product In high-level Inspect mode, you can display values by variable name or statement
number. In low-level Inspect mode, you can display values by machine address. By
default, values display in decimal base.
You can step through your program a statement at a time or you can set breakpoints at
points in your program at which you want to suspend execution. Each time your
program pauses, you can display values to determine what is happening during
execution.
Requesting the
Inspect Product
To request the Inspect product, use the INSPECT directive in the compilation. To
request the high-level Inspect mode, use the SYMBOLS directive in the compilation.
SYMBOLS saves your program symbols in the object file for use in Inspect sessions.
You can specify the INSPECT and SYMBOLS directives in the compilation command
or in your source file. The following example shows a directive line in a source file.
?INSPECT, SYMBOLS
Compiling the Source File When your source file is completed, you can compile the source file by issuing a
compilation command at the TACL prompt:
TAL /IN mysrc/ myprog
Starting the
Inspect Session
You can start the Inspect session and the object file by issuing the RUND (debugger)
command at the TACL prompt:
RUND myprog
Your program drops into high-level Inspect mode and suspends program execution
before the first instruction in your program executes. While the program is
suspended, you can use Inspect commands to request breakpoints, step through the
program, display program results, and so on.