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-34
Native Program Example
We can display the information in PROCESS_HANDLE by using two steps: reading
the pointer address stored at $SP + %HB0 and then using that address to display the
information in PROCESS_HANDLE. Alternatively, we can use the extended string
indirect-clause in the address part of the display command. The following shows both
methods:
= Command
We can use the = command to see a value in various bases. For example, if we take
the value of the fourth 16-bit word of the PROCESS_HANDLE array and use it in the =
command, we get the following:
We stop the program after segments 1and 2 have been allocated in the main
procedure of EXAMPLE_MAIN. We see from the noft listing that the procedure starts
at 0x70000570 and is 320 (decimal) bytes long.
I Command
We need to analyze the code to see where to put the breakpoints. Note that the
decoding instruction uses decimal numbers frequently. We can assume that unless the
number is prefixed with a 0x, it is a decimal number when it appears in the decoding
instruction.
050,03,00266-DN $SP + %HB0
4FFFFEE0: 0x08000002
050,03,00266-DN 0x08000002, #5 :D
08000002: #00256 #00000 #00003 #00266 #00000 #00000 #00011 #56140
08000012: #00000 #00050 0x000B 0xDB4C
050,03,00266-DN ($SP + %HB0)SX, #5:D
08000002: #00256 #00000 #00003 #00266 #00000 #00000 #00011 #56140
08000012: #00000 #00050
050,03,00266-= #00266
= %000412 #00266 0x010A '..'