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-37
Native Program Example
have a nonzero value. First we display the location, then we modify the location.
Finally, we display the location again.
The ERROR_MAIN variable is 2 bytes or 16 bits out of a 32-bit word. The first
command we used was the DN command to display the 32-bit word as two 16-bit
words. The second display we used is the D command with the N-address option to
show one 16-bit word. We used the M command without the N-address option to
assign a 16-bit value to the word. We could have also used the M command with the
N-address option, but we would have needed to keep the value of the lower 16 bits of
the 32-bit word unchanged, by entering their value. In that case, the command we
would have entered is M N $SP + #70, 0xFFFF0000.
We resume and see the call to Debug, then resume to the next breakpoint. The call to
Debug produces a different message at the stop than when we hit a breakpoint.
Modifying Register Contents
We simulate an error returned from the call to SEGMENT_ALLOCATE_ by modifying
the value used in the branch instruction to have a nonzero value. This time we use the
modify command to change the register interactively. First, we display the current code
location, clear the break at the location, and see the instruction at the location. Then
we modify the value, display the register, and resume.
050,03,00266-DN $SP + #70 :H 2
4FFFFF2E: 0x0000 0x0000
050,03,00266-D N $SP + #70
4FFFFF2E: 0x0000
050,03,00266-M $SP + #70, -#1
050,03,00266-DN $SP + #70 :H
4FFFFF2E: 0xFFFF0000
050,03,00266-R
DEBUG $PC=0x700005C8
050,03,00266-R
DEBUG $PC=0x70000600 -RISC BREAKPOINT ($PC: 0x70000600)-
050,03,00266-I $PC
70000600: BREAK INSPECT RISC
050,03,00266-C $PC
050,03,00266-I $PC
70000600: BEQ t9,$0,0x70000618
050,03,00266-M $T9
*REG*: 0x00000000 <- 4
050,03,00266-D $T9
*REG*: 0x00000004
050,03,00266-R
DEBUG $PC=0x70000610