Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-10
TNS Program Example
is to enter the sum of the offset and the base %255 (44 + 211), as shown in the
example below. After entering the breakpoints we resume to the location.
Modify Command
Here, we demonstrate the use of the modify (M) command. At this point in our
example, we simulate an error returned from a call to the SEGMENT_ALLOCATE_
procedure by modifying the value in the ERROR_MAIN variable, located at L 1, to
have a nonzero value. First we display the location for ERROR_MAIN, then modify
the location.
We resume to see the call to Debug. We display the value in the ERROR_MAIN
variable in an octal format (default) and in a decimal format. We then resume to the
next breakpoint.
Again, we simulate an error returned from the call to the SEGMENT_ALLOCATE_
procedure by modifying the value in the ERROR_MAIN variable to have a nonzero
value. This time we use the M command interactively:
050,03,00013-B %211+%21
ADDR: UC.%00,%000232 INS: %040401 SEG: %020737
INS: LOAD L+001
050,03,00013-B %255
ADDR: UC.%00,%000255 INS: %040401 SEG: %020737
INS: LOAD L+001
050,03,00013-R
DEBUG P=%000232, E=%000217, UC.%00-BREAKPOINT-
050,03,00013-D L 1
%000016: %000000
050,03,00013-M L 1, -1
Note. A call to Debug produces a different message at the stop than when we hit a
breakpoint.
050,03,00013-R
DEBUG P=%000236, E=%000227, UC.%00
050,03,00013-D L 1
%000016: %177777
050,03,00013-D L 1 :D
%000016: #65535
050,03,00013-R
DEBUG P=%000255, E=%000217, UC.%00-BREAKPOINT-
50,03,00013-M L 1
%000016: %000000 <- 4
%000017: %000000 <-
050,03,00013-R
DEBUG P=%000261, E=%000207, UC.%00