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
Debug Command Overview
Debug Manual—421921-003
3-14
Address Syntax
N-mode
Indicates that the user is in a 32-bit address mode.
Considerations
•
If you omit address-mode and if offset is a 16-bit word expression, Debug 
assumes one of two address modes depending on where address appears. If 
address appears in a B, C, or I command, omitting address-mode causes 
Debug to use a C-relative code address in the current TNS code segment (same 
as C address-mode). 
°
If address appears in a D, A, FN, or M command, omitting address-mode 
causes Debug to use a G-relative address in the TNS user data segment.
•
If you omit address-mode and if offset is a 32-bit expression, Debug assumes 
extended addressing. 
•
To indicate an address in a flat segment, use N-mode address and specify a 32-bit 
RISC address in the flat segment range as returned by the ALLOCATESEGMENT 
or SEGMENT_ALLOCATE_ procedure call.
•
When using UC and UD as a default, the user needs to take the following into 
consideration:
°
If the command deals with code, UC is assumed as the default.
°
If the command deals with data, UD is assumed as the default.
•
Direct addressing versus indirect addressing
There are two basic forms of the display command: the direct form and the indirect 
form. The direct form is used to display direct variables, value parameters, 
contents of pointers, and the addresses in reference parameters. The indirect form 
is used to display indirect variables (arrays), objects of pointers, and the values of 
reference parameters.
Using the Direct Form
In the following example, the programmer wants to display the contents of some 
global variables. The first action is to refer to the map of global identifiers located at 
the end of the compiler listing:
 DB^BUF   VARIABLE   INT G+010  INDIRECT
 DB^COUNTREAD  VARIABLE  INT G+011  DIRECT
 DB^ERRCNT    VARIABLE  INT G+007  DIRECT
N Use N mode to indicate addresses in native or accelerated code, RISC 
stacks, native globals and heap areas, flat segments or the currently in-use 
selectable segment, or anywhere 32-bit addressing is convenient.
In nonprivileged mode, you can specify addresses in user space, 0 through 
0x7FFFFFFF. (Not all of these addresses are valid in any process 
environment, and some ranges are reserved for privileged access.) 
In privileged mode, you can specify all available addresses. 










