Debug Manual
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction
- Execution Modes on TNS/R Systems
- What User Access Is Required for Debugging
- How to Make a Process Enter Debug
- How to Select Debug as the Debugger
- Why a Process Enters Debug
- How to Determine Process State on a Trap or Signal
- Ending a Debug Session
- What Appears in the Debug Header Message
- How to Use Debug
- How Debug Breakpoints Work
- 2 Using Debug on TNS/R Processors
- 3 Debug Command Overview
- 4 Debug Commands
- Command Summary
- A Command
- AMAP Command
- B Command
- BASE Command
- BM Command
- C Command
- CM Command
- D Command
- DJ Command
- DN Command
- EX[IT] Command
- F[ILES] Command
- FC Command
- FN Command
- FNL Command
- FREEZE Command
- HALT Command
- H[ELP] Command
- I Command
- IH Command (TNS/R Native and OSS Processes)
- INSPECT Command
- LMAP Command
- M Command
- MH Command (TNS/R Native and OSS Processes)
- P[AUSE] Command
- PMAP Command (Accelerated Programs)
- PRV Command
- R Command
- S[TOP] Command
- T Command
- V Command
- VQ Command
- VQA Command
- = Command
- ? Command
- A Error Messages
- B ASCII Character Set
- C Command Syntax Summary
- Register Syntax
- Expression Syntax
- Address Syntax
- A Command
- AMAP Command
- B Command
- BASE Command
- BM Command
- C Command
- CM Command
- D Command
- DJ Command
- DN Command
- EX[IT] Command
- F[ILES] Command
- FC Command
- FN Command
- FNL Command
- FREEZE Command
- HALT Command
- H[ELP] Command
- I Command
- IH Command
- INSPECT Command
- LMAP Command
- M Command
- MH Command
- Output-Device Syntax
- P[AUSE] Command
- PMAP Command
- PRV Command
- R Command
- S[TOP] Command
- T Command
- V Command
- VQ Command
- VQA Command
- = Command
- ? Command
- D Session Boundaries
- E Correspondence Between Debug and Inspect Commands
- F Sample Debug Sessions
- Glossary
- Index

Sample Debug Sessions
Debug Manual—421921-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