Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-39
Native Program Example
T Command
We resume the program. After reaching the breakpoint, we use the T and TN
commands to trace the stack and show the names:
Clear Breakpoint at the Current Location
If the program is stopped at a code breakpoint, you need to specify only the C
command to clear the breakpoint. We will look at the breakpoints before and after this
operation.
The EXAMPLE_FILL_ARRAY procedure uses one of the previously allocated
segments. We can see the current segment in use with the ? command and display the
ARRAY_NUM parameter at $SP + %h82. Note that ARRAY_NUM is only 2 bytes long.
The :d part of the command caused the 32-bit word to break into two 16-bit words.
When we resume the program, it puts data segment 1 into use, then prompts us for
some data. We enter "abcdefg". The program places the input data in a local buffer,
then moves it to the data segment. At this point of our example, we arrive at the
050,03,00266-t
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00266-t
0x70000478 VFP=0x4FFFFEE8 UCr
0x4FFFFE9C: 0x7000066C VFP=0x4FFFFF30 UCr
050,03,00266-tn
0x70000478 VFP=0x4FFFFEE8 EXAMPLE_FILL_ARRAY + 0x14
0x4FFFFE9C: 0x7000066C VFP=0x4FFFFF30 EXAMPLE_MAIN + 0xFC
050,03,00266-b
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
N: 0x70000568 INS: 0x03E00008
INS: JR ra
050,03,00266-c
050,03,00266-b
N: 0x70000568 INS: 0x03E00008
INS: JR ra
050,03,00266-?
USE SEGMENT ID = NONE
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTUGRB0
PRV = OFF
050,03,00266-DN $sp+ %h82, 1 :d
4FFFFEEA: #00001 #00000