Guardian Procedure Calls Reference Manual

DEBUG Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Considerations
OSS Considerations
Related Programming Manual
Summary
The DEBUG procedure invokes the debugging facility on the calling process.
The operating system provides a debugging facility that responds to debug events by passing
control to one of two debugging utilities: Debug or the Inspect debugger. Debug is a low-level
debugger. The Inspect debugger is an interactive symbolic debugger that lets you control program
execution, display values, and modify values in terms of source-language symbols.
Syntax for C Programmers
#include <cextdecs(DEBUG)>
void DEBUG ( void );
Syntax for TAL Programmers
CALL DEBUG;
Considerations
While a process is in the debug state, you can interactively display and modify the contents
of the process' registers, the process' data area, and set other breakpoints. To debug a
program, you must have EXECUTE access to run the program and read access to the program
object file.
In addition to placing an explicit call to the DEBUG procedure in the source program, you
can force a process into the debug state by:
Starting the process using the command interpreter's RUND (RUN DEBUG) command.
The process enters the debug state before the first instruction of the MAIN procedure
executes.
Starting the process with a call to PROCESS_CREATE_, PROCESS_SPAWN_,
NEWPROCESS, NEWPROCESSNOWAIT, OSS tdm_fork(), OSS tdm_spawn() or
one of the OSS tdm_exec set of functions, and setting the appropriate debug option.
The process enters the debug state before the first instruction of the MAIN procedure
executes.
Starting the process from the command interpreter. While the process is executing, press
the BREAK key. The command interpreter returns to the command input mode. Find the
cpu,pin of the process, and type in DEBUG cpu,pin.
Specifying a breakpoint when a process is in the debug state. When that breakpoint is
hit, the process enters the debug state.
254 Guardian Procedure Calls (D-E)