Inspect Manual

Using Inspect With TNS/R Native Programs
Inspect Manual429164-006
17-16
Examples
The output above illustrates that parameter Param^1 is stored in register $4 or $A0
and that parameter Param^2 is stored in register $5 or $A1 and is indirect. The
Inspect DISPLAY and DISPLAY REGISTER commands can be used to display the
contents of these variables.
4. Using a Signal Handler to Control Program Flow
Inspect allows you to change a signal handler to several values, including
SIG_DEBUG which can be used to gain control of a program when a signal is
delivered. For example, if a TNS/R native application is receiving an arithmetic
overflow trap (signal SIGFPE), change the signal handler for SIGFPE and rerun
the program. For example:
-PROG-INFO IDENTIFIER Param^1
PARAM^1: VARIABLE
storage^info:
TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1
ELEMENTS
access^info:
REGISTER 4 ($A0)
-PROG-INFO IDENTIFIER Param^2
PARAM^2: VARIABLE
storage^info:
TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1
ELEMENTS access^info:
REGISTER 5 ($A1)X
-PROG-DISPLAY Param^1
PARAM^1 = 10
-PROG-DISPLAY REGISTER $4
REGISTER $4 = 10
-PROG-DISPLAY Param^2
PARAM^2 = 99
-PROG-DISPLAY REGISTER $5
REGISTER $5 = 1342177068
-PROG-DISPLAY (1342177068) TYPE INT
99