Inspect Manual

Debugging Processes and Save Files
Inspect Manual429164-006
4-10
Guidelines for Debugging a Process
The operating system then starts the debugging tool specified by the Inspect attribute
of the process on the process's home terminal.
These three methods of starting an Inspect session can direct Inspect to use a terminal
other than the process's home terminal as the Inspect command terminal. Selecting a
different command terminal is useful when the process you're going to debug requires
exclusive or extensive use of its home terminal, or if it owns the BREAK key.
Debug Procedure and Unhandled Traps
When a process invokes the Debug procedure or encounters a trap for which it has not
established a handler, a debug event occurs for that process. The operating system
then starts the debugging tool specified by the Inspect attribute of the process on the
process's home terminal.
Guidelines for Debugging a Process
The following subsections offer guidelines that make the task of debugging processes
easier.
Debugging with Two Terminals
If the process you are debugging requires exclusive or extensive use of its home
terminal, or if it owns the BREAK key (see “Break Feature” in the Guardian
Programmer’s Guide), you can direct Inspect to use a terminal other than the process's
home terminal in a variety of ways:
You can enter an Inspect TERM command.
You can use the TERM clause of the command interpreter DEBUG command.
You can use the TERM clause of the TACL #DEBUGPROCESS built-in function.
A process specifies the term parameter when invoking the DEBUGPROCESS
procedure.
The first method changes the Inspect command terminal after the Inspect session has
begun, while the others redirect the Inspect command terminal just as the session
begins.
Note. The process enters the hold state as soon as it completes the machine-code instruction
that was executing when the debug event occurred. If the process has invoked a procedure, it
will not enter the hold state until the procedure returns control to the process.
Note. Changing to a terminal other than your home terminal changes the home terminal of the
process being debugged.