Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-46
Native Program Example
procedure after the SP register has been set up, so that we point to the correct location
for ARRAY_NUM. First we run the program as follows: RUND ndemo1.
The ARRAY_NUM variable is a 16-bit (2 bytes long) number, so we enter the condition
address as a 32-bit address without an N prefix. If we want to have a conditional
breakpoint on a 32-bit number, we would prefix the conditional address with the N.
Execute Breakpoint
The next example shows the execute breakpoint using the BM command. First we run
the pTAL compiled listing: RUND ondemo1.
We put a memory-access breakpoint on the first 16-bit word of data pointed to in the
IN_OUT_MESSAGE array of the EXAMPLE_FILL_ARRAY procedure. We stop near
the beginning of EXAMPLE_FILL_ARRAY and look at the data in IN_OUT_MESSAGE.
The data in the current location is junk, left on the stack from the EXAMPIL_INIT
procedure that we used in previous examples.
050,03,00267-b 0x70000478
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
050,03,00267-r
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00267-c
050,03,00267-b 0x70000478, 0x4FFFFEEA > #16
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
%047777.177352 & %177777 > %000020
050,03,00267-r
enter some data
abcdefg
enter some data
lmnopqrst
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00267-dn $sp+%h82 :d
4FFFFEEA: #00017 #00000
050,03,00269-b 0x70000478
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
050,03,00269-r
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00269-dn $SP + %H4c, %h30/4 :a
4FFFFEB4: .$ZTN. .00.#. .PTK9. .AAB..
4FFFFEC4: ...... ...... ...... ......
4FFFFED4: ...... ...... ...... ......