Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-19
TNS Program Example
Additional Breakpoint Options
Next, we demonstrate some variations on the B and BM commands. We run the object
file in Example F-2 on page F-4 several times to show the various options with the B
and BM commands. The first example will show the breakpoint tracing.
We put a breakpoint near the beginning of the EXAMPLE_FILL_ARRAY procedure
and show the content of the ARRAY_NUM parameter. We also put a breakpoint at the
end of EXAMPLE_FILL_ARRAY and show the data in the selectable segment at a 40-
byte offset for 16 bytes.
In order to ensure that the output values are within the scope of the procedure we are
debugging, we need to make sure that the address reference in the trace clause is
evaluated within the context of the procedure. So, we put a breakpoint after the stack
has been set up and resume to the breakpoint. First we look at the code to find an
appropriate location at put the breakpoint. In this case, this location is right after the
stack has been set up and initialized.
We then clear the breakpoint and put in another breakpoint with the trace clause.
050,03,00009-i %104, 20
%000104: ADDS +002 LADR L+006 LLS 01 PUSH 700
%000110: ADDS +032 LOAD L-003 PUSH 700 ADDS +006
%000114: LDLI +200 LDI -007 PUSH 711 XCAL 006
%000120: STOR L+002 LOAD L+002 CMPI +000 BEQL +001
050,03,00009-b %117
ADDR: UC.%00,%000117 INS: %127006 SEG: %020707
INS: XCAL 006
050,03,00009-r
DEBUG P=%000117, E=%000227, UC.%00-BREAKPOINT-
050,03,00009-c
050,03,00009-b %117, l-3 ? 1
ADDR: UC.%00,%000117 INS: %127006 SEG: %020707
INS: XCAL 006
L %177775 ? %000001
050,03,00009-b %104+%73, n 0x00080028 ? #16/2
ADDR: UC.%00,%000177 INS: %125004 SEG: %020707
INS: EXIT 04
N 0x00080028 ? 0x00000008