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

Using Debug on TNS/R Processors
Debug Manual—421921-003
2-12
TNS and TNS/R Register Correspondence
TNS and TNS/R Register Correspondence
TNS/R processors maintain many of the TNS environment hardware and program
registers. The location and contents of TNS environment registers might vary
depending on the registers involved and the state of the process when Debug was
entered.
Table 2-1 lists TNS environment registers and corresponding TNS/R implementation.
Table 2-2 on page 2-13 provides a summary of how TNS/R registers are used with
native, TNS, and accelerated execution modes.
Table 2-1. TNS Register Implementation Summary
TNS
Register TNS/R Implementation
S S register (stack pointer) is maintained in register $29 (alias $SP). The value
is exact in TNS execution mode but approximate in accelerated execution
mode, except at register-exact points. The value is a 32-bit byte address
equivalent to the TNS S register value.
P The P-register is inferred from the TNS/R PC register (program counter) in
accelerated execution mode; it is retained in the PX register in TNS execution
mode.
ENV The ENV register is maintained in several different TNS/R registers and data
locations. The bits from left to right are implemented as follows:
< 0:15>Unused; must be 0
<16:19>Reserved; must be 0
<20>LS; 1 if executing in user library
<21>PRIV; valid only if privileged
<22>DS; 1 if executing TNS interrupt handler; valid only if privileged
<23>CS; 1 if executing in TNS execution mode in system library
<24>T; 1 if TNS arithmetic overflow traps are enabled
<25>Undefined; see K register ($14, alias $T6)
<26>V;1 if TNS arithmetic overflow occurred
<27:31>CSPACEINDEX; set #0 through 31 within current code file
L L register (frame pointer) is maintained in TNS/R register $30 (alias $S8 or
$FP). The value always contains a 32-bit byte address equivalent to the TNS
L register value.
CSPACEID This is maintained in fields LS, CS, and CSPACEINDEX of ENV.
R0,R1,...R7 TNS register stack pointers are maintained in registers $16 through $23 (alias
$S0 through $S7) in accelerated execution mode; values in accelerated
execution mode are equal to the TNS register values only at register-exact
points.
Also, in TNS execution mode, register $22 (alias $S6) contains an extended
address pointing to the register stack array that holds the TNS registers R0
through R7.