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-4
Running TNS Program Files
•
In native mode, local variables are sometimes cached in registers. Attempting to
modify a local variable or use it for a purpose such as setting a memory-access
breakpoint can have unexpected results.
•
In highly optimized native object code, parameter values are sometimes cached in
registers, making their exact location unpredictable.
•
The PMAP command is not valid in native mode.
•
In native mode, the D register commands display only TNS/R registers.
Running TNS Program Files
TNS program files generated by compilers and the Binder execute with their TNS
instruction set because execution is facilitated by millicode. Millicode is assembled
program code, consisting of RISC instructions, that implements various TNS low-level
functions. Such functions include, but are not limited to, exception handlers, real-time
translation routines, and the library of routines that implements the TNS instruction set
(the equivalent of microcode in other processors).
TNS program files executed on TNS/R processors by the use of millicode in this way
are said to be in “TNS execution mode.”
Running Accelerated Program Files
The Accelerator provides two options that affect optimization and debugging:
•
ProcDebug
•
StmtDebug
By default, the Accelerator optimizes programs across source-code statement
boundaries to optimize procedure execution (that is, the ProcDebug option is on). The
ProcDebug option generates RISC instructions that do not follow TNS statement
boundaries, therefore producing optimized RISC instruction sequence.
The Accelerator also provides the StmtDebug option, which generates RISC
instructions that optimize only within the code produced for any one source-code
statement. The resulting code might not be as optimized as code generated by the
ProcDebug option, but in this way you can debug individual TNS statements.
Considerations in Using the Accelerator
Consider these points when debugging accelerated programs.
•
It is recommended that programs be compiled with SYMBOLS ON before they are
accelerated, because the Accelerator can generate more efficient code with the
information resulting from the SYMBOLS ON option.
•
In rare cases, accelerated programs can have portions that are executed in TNS
execution mode and portions that are executed in accelerated execution mode.