Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-30
Native Program Example
Example F-4. noft Listing of pTAL Program
Out File : $s.#lnexp1
Object File : $NATIV1.CRGMAN.nexp1
File Format : ELF
Scope : (none)
Case : Sensitive
******** List of Procedures ********
Number : 2
Name : EXAMPLE_INIT
Address : 0x70000390
Size : 212 bytes
Subprocedure : No
Visibility : External
Optimization Level : (unknown)
Parent Procedure : (none)
Source File : Source name stripped
Number : 3
Name : EXAMPLE_FILL_ARRAY
Address : 0x70000464
Size : 268 bytes
Subprocedure : No
Visibility : External
Optimization Level : (unknown)
Parent Procedure : (none)
Source File : Source name stripped
Number : 4
Name : EXAMPLE_MAIN
Address : 0x70000570
Size : 320 bytes
Subprocedure : No
Visibility : External
Optimization Level : (unknown)
Parent Procedure : (none)
Source File : Source name stripped
Break Command
Here, we demonstrate breakpoints using the EXAMPLE_INIT procedure in our native
program in Example F-3 on page F-28. In the following example, we demonstrate
issuing breakpoints at the global scope of our program. Later, we will demonstrate
breakpoints within a local procedure.
To start debugging the native program example, we enter the following command. (If
the program starts in Inspect, enter the SELECT DEBUGGER DEBUG to access
Debug.)
For this example, we look at the before and after results that occur as a result of
executing the EXAMPLE_INIT procedure. We put a breakpoint near the beginning and
near the end of the procedure. (This is similar to what we did for the TNS example.)
From the noft listing in Example F-4, we find that EXAMPLE_INIT starts at
0x70000390. We put a breakpoint three instructions after the beginning breakpoint so
that the stack can be set up. Each instruction is 4 bytes long. We use the B command
to specify the first breakpoint.
RUND ndemo1
DEBUG $PC=0x70000570
050,03,00266-B 0x70000390 + (#3 * #4)
N: 0x7000039C INS: 0x00002025
INS: OR a0,$0,$0