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-24
Accelerated Program Example
PMAP Command
We can enter TNS code breakpoints only at memory-exact and register-exact points.
If we enter the PMAP command at a TNS location, we get a set of RISC code output
that corresponds to the set of TNS code that performs the same functions.
Below, the output shows that TNS address %5 is a register-exact point, which
corresponds to RISC address 0x7042001C. (Note that 0x is omitted on the address
output because of space constraints.)
The TNS code and RISC code locations currently have breakpoints. We can see the
instructions that were in the original code by entering the B * command or by clearing
the breakpoints with the C command and entering the PMAP command again.
We are allowed to set TNS code breakpoints only at locations that are register-exact or
memory-exact. To see other TNS locations where we are allowed to set breakpoints,
we can specify the address and the length with the PMAP command, as shown in this
example:
Observe that TNS address %7 is a memory-exact point and that TNS address %13 is
the next register-exact point.
050,03,00032-pmap %05
%000005: @ BPT ADDS +010
7042001C: BREAK INSPECT RISC LUI at,0x7FFF ADD $0,sp,at
050,03,00032-c
050,03,00032-pmap %05
%000005: @ ADDS +035 ADDS +010
7042001C: ADDIU sp,sp,78 LUI at,0x7FFF ADD $0,sp,at
050,03,00032-pmap %5 , #14
%000005: @ ADDS +035 ADDS +010
7042001C: ADDIU sp,sp,78 LUI at,0x7FFF ADD $0,sp,at
%000007: > LDI +000 LDI -010 PUSH 711 XCAL 002
70420028: LI s1,-8 SH $0,-2(sp) SH s1,0(sp)
70420034: JAL 0x7A5D91F0 LI a0,11
%000013: @ STRP 7 LDI +000 LADR G+001 DLLS 01
%000017: LDLI +300 LDI -002 PUSH 733 XCAL 003
7042003C: LI s0,2 LI s2,-16384 LI s3,-2
70420048: ADDIU sp,sp,8 SWL s0,-6(sp) SWR s0,-3(sp)
70420054: SH s2,-2(sp) SH s3,0(sp) JAL 0x7C2CB64C
70420060: LI a0,19