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-26
Accelerated Program Example
Because we are not at a register-exact point, the displayed registers issued a warning
message. The warning message indicates that the TNS registers might not contain the
correct values at this point of the program. If we need to find a memory-exact or
register-exact location near this RISC location, we can specify the RISC location to the
PMAP command.
Note that the RISC register $PC is specified to the PMAP command. For an
accelerated program, the RISC registers can be used in expressions to commands.
Next, we clear the breakpoints and set a breakpoint on the next memory-exact point.
Before resuming, we use the LMAP command to find the address of the routine to
which the JAL instruction is jumping.
*** WARNING: TNS STATE MAY NOT BE WHERE YOU THINK IT IS ***
S=%000063 P=%000013 E=%000317 L=%000022 SP=UC.%00
ENV IS: TK CCE RP7
EXAMPLE_INIT + %000006
*REG* %000002 %104010 %140000 %177776 %177440 %000031 %002404 %002412
EXECUTION MODE = ACCELERATED
$PC: 0x7042004C $HI: 0x0000246F $LO: 0x8881FC7E
$00: $00: 0x00000000 $AT: 0x70000000 $V0: 0x7E000000 $V1: 0x00000000
$04: $A0: 0x0000257D $A1: 0x00000000 $A2: 0x0000000B $A3: 0x80022438
$08: $T0: 0x7042003C $T1: 0x7042003C $T2: 0x70400000 $T3: 0x70400000
$12: $T4: 0x0000FD13 $T5: 0x8006FC14 $T6: 0xFFFFFFFF $T7: 0x00000000
$16: $S0: 0x00000002 $S1: 0x7A5D8808 $S2: 0xFFFFC000 $S3: 0xFFFFFFFE
$20: $S4: 0xC5FFFF20 $S5: 0x00000019 $S6: 0x00000504 $S7: 0x0000050A
$24: $T8: 0x70000000 $T9: 0x00000080 $K0: 0xA713A713 $K1: 0xA713A713
$28: $GP: 0x70400A00 $SP: 0x00000066 $S8: 0x00000024 $RA: 0x7A5D9A2C
050,03,00032-pmap $pc , 7
%000013: @ BPT LDI +000 LADR G+001 DLLS 01
%000017: LDLI +300 LDI -002 PUSH 733 XCAL 003
7042003C: BREAK INSPECT RISC LI s2,-16384 LI s3,-2
70420048: ADDIU sp,sp,8 BREAK INSPECT RISC SWR s0,-3(sp)
70420054: SH s2,-2(sp) SH s3,0(sp) JAL 0x7C2CB64C
70420060: LI a0,19
%000023: @ STOR L+001
70420064: SH s0,2(fp)
050,03,00032-c *
050,03,00032-b %23
@ ADDR: UC.%00,%000023 INS: %044401 SEG: %020737
INS: STOR L+001
050,03,00032-lmap 0x7C2CB64C
$PROCESSHANDLE_NULLIT_ (SLr)
050,03,00032-r
DEBUG P=%000023, E=%000217, UC.%00-BREAKPOINT-