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-36
Native Program Example
We can confirm that the JAL in the above sequence is a call to Debug by using the
LMAP command:
This does not work all the time. For example, the call to SEGMENT_ALLOCATE_ goes
through a gateway to provide a protection layer between PRIV and non-PRIV code.
Gateway and millicode addresses cannot be interpreted by the LMAP command. The
following is the address for SEGMENT_ALLOCATE_ shown in an earlier code
sequence. Below, we show the information the AMAP command provides about the
address:
Break Command (Continued)
Below, we put a breakpoint after the first call to SEGMENT_ALLOCATE_ and after the
second call to SEGMENT_ALLOCATE_:
At the first location, we stopped just as the ERROR_MAIN value at $SP + 70 was
about to be loaded into register T7. In the second case, the value was already loaded
in register T9 and we are about to branch based on the content in this register. We
resume to the first location.
DN Command (Continued)
At this point in our example, we simulate an error returned from the call to
SEGMENT_ALLOCATE_ by modifying the value in ERROR_MAIN at $SP + 70 to
Note. If a compiler optimization level other than 0 is used, it is unlikely that the return value
from SEGMENT_ALLOCATE_ would be stored in memory. It would probably just be kept in a
register.
050,03,00266-LMAP 0x7C369070
DEBUG (SLr)
050,03,00266-LMAP 0x7F8051A8
050,03,00266-AMAP 0x7F8051A8
Address: 0x7F8051A8
Kind = 0x000B: SL (NATIVE)
Attributes: Read Only, Code, Entry Vector, Priv To Write
050,03,00266-B 0x700005B0
N: 0x700005B0 INS: 0x87AF0046
INS: LH t7,70(sp)
050,03,00266-B 0x70000600
N: 0x70000600 INS: 0x13200005
INS: BEQ t9,$0,0x70000618
050,03,00266-R
DEBUG $PC=0x700005B0 -RISC BREAKPOINT ($PC: 0x700005B0)-