Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-23
Accelerated Program Example
The memory-access breakpoint is triggered when anything is written to the 16-bit word.
In this case, we get two interrupts at EXAMPLE_FILL_ARRAY + %41: one when the
"e" is put into the word, and another when the "n" is put into the word. This double
interrupt is true only when the code putting the data in the memory location is doing
byte operations and the code is not PRIV. The next break happens after the data is
entered. In the second case, the data is transferred in the PRIV system procedure, so
the breakpoint is reported after the end of the PRIV procedure.
Accelerated Program Example
Debugging accelerated programs is similar to debugging TNS programs, with some
differences between the two. In this subsection, we discuss the differences between
TNS and accelerated programs.
To generate an accelerated object file, we use the demo1 program in Example F-2 on
page F-4 and get an accelerated program as follows:
AXCEL demo1,ademo1. Because the ademo1 object file does not have significant
information, the listing is not provided here. For more information about using the
Accelerator refer to the Accelerator Manual.
Break Command
We run the ademo1 object file and put a breakpoint at EXAMPLE_INIT procedure.
When we specify the B command in an accelerated program, we are actually entering
two breakpoints, one in TNS code and another in RISC code.
Using of the B command to insert a TNS code breakpoint and using the B* command
to insert a RISC code breakpoint:
RUND ademo1
DEBUG P=%000211, E=%000207, UC.%00
050,03,00032-b %5
@ ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
050,03,00032-r
DEBUG P=%000005, E=%000207, UC.%00-BREAKPOINT-
050,03,00032-b ! TNS breakpoint
@ ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
050,03,00032-b * ! RISC breakpoint
@ ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
^--N: 0x7042001C INS: 0x27BD004E
INS: ADDIU sp,sp,78