Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-37
Native Program Example
have a nonzero value. First we display the location, then we modify the location.
Finally, we display the location again.
The ERROR_MAIN variable is 2 bytes or 16 bits out of a 32-bit word. The first
command we used was the DN command to display the 32-bit word as two 16-bit
words. The second display we used is the D command with the N-address option to
show one 16-bit word. We used the M command without the N-address option to
assign a 16-bit value to the word. We could have also used the M command with the
N-address option, but we would have needed to keep the value of the lower 16 bits of
the 32-bit word unchanged, by entering their value. In that case, the command we
would have entered is M N $SP + #70, 0xFFFF0000.
We resume and see the call to Debug, then resume to the next breakpoint. The call to
Debug produces a different message at the stop than when we hit a breakpoint.
Modifying Register Contents
We simulate an error returned from the call to SEGMENT_ALLOCATE_ by modifying
the value used in the branch instruction to have a nonzero value. This time we use the
modify command to change the register interactively. First, we display the current code
location, clear the break at the location, and see the instruction at the location. Then
we modify the value, display the register, and resume.
050,03,00266-DN $SP + #70 :H 2
4FFFFF2E: 0x0000 0x0000
050,03,00266-D N $SP + #70
4FFFFF2E: 0x0000
050,03,00266-M $SP + #70, -#1
050,03,00266-DN $SP + #70 :H
4FFFFF2E: 0xFFFF0000
050,03,00266-R
DEBUG $PC=0x700005C8
050,03,00266-R
DEBUG $PC=0x70000600 -RISC BREAKPOINT ($PC: 0x70000600)-
050,03,00266-I $PC
70000600: BREAK INSPECT RISC
050,03,00266-C $PC
050,03,00266-I $PC
70000600: BEQ t9,$0,0x70000618
050,03,00266-M $T9
*REG*: 0x00000000 <- 4
050,03,00266-D $T9
*REG*: 0x00000004
050,03,00266-R
DEBUG $PC=0x70000610