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

Introduction
Debug Manual—421921-003
1-16
Debug/Program Execution Environment
Debug/Program Execution Environment
Debug executes in a private environment with its own stack; it does not use the
environment of the procedure from which it was invoked. Debug does not use any
processor registers of the process being debugged, so all registers are available to the
user program. Debug runs as part of the original user process executing out of the
system code portion of the process, as illustrated in Figure 1-3. Debug data is stored
outside the user data area.
In a process being debugged, Debug displays output to the terminal and accepts input
from the terminal as illustrated in Figure 1-4 on page 1-17. Panel 1 illustrates control
going to a terminal at an assumed breakpoint. Then Debug requests input. Panel 2
illustrates a request to Debug to display data at location 100. Panel 3 illustrates Debug
reading the location and returning the information, which is the value 25, to the
terminal.
When several processes run the same program file in the same processor module,
they share the code area. If a breakpoint is set in shared code using the default
breakpoint mode, only the process that set the breakpoint enters the debug state when
it executes or accesses the breakpoint location. If you are debugging in privileged
mode, you can direct all processes to break at that location by specifying ALL when
setting the breakpoint.
When a privileged memory-access breakpoint is set with the ALL attribute specified
(for example, BM0,r,ALL), every other memory-access breakpoint in that processor is
inhibited. The other breakpoints return to use when the privileged ALL breakpoint is
cleared. Only one ALL memory-access breakpoint is allowed per processor.
Figure 1-3. Debug/User Process Diagram
VST0103.vsd
System Code System Library System Data
User Code User Library User Data
Debug
User Process
Debug Data