Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-6
TNS Program Example
Thus, we enter UC.0,%5 at the prompt, which gives us the breakpoint at the beginning
of EXAMPLE_INIT procedure:
Selecting a location near the end of the EXAMPLE_INIT procedure, we find that
relative offset 76 (octal) is near the end of the procedure. Thus, adding 76 (octal) to
the starting location gives us the ending breakpoint location of the procedure.
We resume the program and get to the first breakpoint as follows:
LMAP Command
The P value indicates that we have hit the breakpoint at the beginning of the
EXAMPLE_INIT procedure. You can confirm this by passing the P register to the
LMAP command as follows:
Displaying Variable Values
We can look at the before contents of the program’s global variable MY_TERMNUM,
located at the program’s GLOBAL + 0, and the EXAMPLE_INIT procedure variables
HOMETERM_LEN and HOMETERM. HOMETERM_LEN and HOMETERM are
located at L + 34 and L + 4 (octal), respectively. (See the object program listing in
Example F-2
on page F-4.) We use the D command for displaying numeric variables
and the A command for displaying string variables,
We used #48/2 for the length of the A command based on the declaration of the
HOMETERM array. The array was declared as [0:47], which is 48 (decimal) bytes long.
050,03,00013-B UC.0,%5
ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
Note. The octal prefix, %, is used in our examples to emphasize the numeric base of the
numbers shown.
050,03,00013-B UC.0,%5+%76
ADDR: UC.%00,%000103 INS: %125003 SEG: %020737
INS: EXIT 03
050,03,00013-R
DEBUG P=%000005, E=%000207, UC.%00-BREAKPOINT-
050,03,00013-LMAP P
EXAMPLE_INIT (UC.00)
050,03,00013-D UD,%0
%000000: %000000
050,03,00013-D L%34
%000056: %000000
050,03,00013-A L%4, #48/2, B
%000026................................................