Guardian Programmer's Guide

Table Of Contents
Debugging, Trap Handling, and Signal Handling
Guardian Programmer’s Guide 421922-014
25 - 10
Handling Trap Conditions
Refer to the Guardian Procedure Errors and Messages Manual for a detailed
description of each trap condition, including what might have caused the trap and
recommended action.
You can respond to a trap in one of the following ways:
In the TNS/E environment all traps result in the process abending. This is the
default action. If this is a TNS process, debug it using INSPECT; the TNS/E
environment does not recognize Native Inspect for TNS processes.
The TNS or TNS/R environments allow either the Inspect program or Debug to be
automatically invoked. This is the default action. If Inspect is specified for the
process and it is available, then Inspect is the default debugger; otherwise Debug
is the default debugger. In other words, if you do nothing, all traps result in control
being passed to either Debug or the Inspect program. A screen similar to the
following appears:
>RUN Z
INSPECT-Symbolic Debugger-T9673C20-(10 July89) System \SYS
Copyright Tandem Computers Incorporated 1983, 1985-1989
INSPECT TRAP 2- (arithmetic overflow)
099,07,053 #TRAP^USER.#43(MYPROG)
-Z-
Note that line 3 of the display identifies the trap condition.
Refer to the Inspect Manual and the Debug Manual for operational details on the
Inspect program and Debug.
Table 25-1. Summary of Trap Conditions
Trap
Number Cause of Trap
0
1
2
3
4
5
8
11
12
13
Invalid address reference
Instruction failure
Arithmetic overflow
Stack overflow
Process loop-timer timeout
Invalid call from process with PIN greater than 255
Signal (Under very unusual circumstances, a signal is delivered to a TNS
pr
ocess and appears as a trap 8.)
Memory manager disk read error
No memory available
Uncorrectable memory error