Debug Manual

Table Of Contents
Introduction
Debug Manual421921-003
1-6
Running Debug From the OSS Shell
setting the breakpoint, resume execution. Debug prompts when the code location is
executed or the memory location is accessed:
Example of a code breakpoint:
106,06,00125-B 0x700003B0 ! Set RISC breakpoint at 0x700003B0
N: 0x700003B0 INS: ADDIU sp,sp,-24
106,06,00125-R ! Resume execution.
DEBUG P=%700003B0, E=%000207 UC.%00-BREAKPOINT- ($PC=0x700003B0)
106,06,00125- ! Awaiting input in debug state.
Running Debug From the OSS Shell
You can use Debug in the Open System Services (OSS) environment. When running
a program from the OSS shell, you can cause it to enter the debug state before the
first instruction of the main procedure is executed. This example causes the program
ossprog to enter the debug state with Debug as the debugger:
$ run -debug -inspect=off ossprog
If the command line in the preceding example said -inspect=on, and if the program
ossprog were compiled with SYMBOLS ON, then Inspect would be the debugger.
When either of those two conditions are not satisfied, Debug is the debugger.
How to Select Debug as the Debugger
Debug is the default debugger; however, commands can set the Inspect debugger as
the default debugger. If the Inspect debugger has been set as the default for a
process, any new process created by the old process also uses the Inspect debugger
unless the procedure creating the new process explicitly overrides using the Inspect
debugger.
The following list indicates commands or procedures you can use to invoke process
execution to ensure that Debug is the default debugger for a Guardian process. These
methods are listed in the order of precedence, with the highest precedence first. For
example, a process started with method 1 would override debugger selection
potentially set in the process’s program object file by method 3.
1. Specify Debug as the debugger in the PROCESS_LAUNCH_ procedure. For
information on using this procedure, see the Guardian Procedure Calls Reference
Manual.
2. In a RUND command to run your program through the command interpreter,
specify INSPECT OFF. Also, in a RUND command, do not specify either the
INSPECT or SAVEABEND parameters. (Either of these parameters selects the
Inspect debugger.) For information on the RUND command, see the TACL
Reference Manual.
This RUND command is equivalent to method 1 above, because it is a method of
creating a new process.