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-33
Native Program Example
The length is the number of 32-bit words to display. The :H 2 part of the first command
below breaks the output into two-byte hexadecimal groups. The :D part of the second
command breaks the output into two-byte decimal groups.
We again check for open files. This time file number 1 is opened with the name shown
with the A command and the DN :A command.
FC Command
The default output for the DN command is hexadecimal. We can change the output
using the base option. (Use HELP DN for syntax information.) Below, we use the FC
command to change the command. We can look at the contents of the program’s
global variable PROCESS_HANDLE array in the default form and in decimal form. The
PROCESS_HANDLE array starts at program _GLOBAL address 2 and is five 32-bit
words long.
At this point in the procedure, the local extended integer pointer, HANDLE_PTR,
located at $SP + %HB0, is set to the program’s global array, PROCESS_HANDLE,
starting at _GLOBAL + 2. Thus, we know the address for _GLOBAL is 0x08000002.
050,03,00266-DN 0x08000000, 1 :H 2
08000000: 0x0001 0x0100
050,03,00266-DN $SP + %H7E, 1:D
4FFFFEAE: #00019 #23629
050,03,00266-DN $sp + %h80, #20/4 :A
4FFFFEB0: .\M5.. .$ZTN. .00.#. .PTUG.
4FFFFEC0: .RB0..
050,03,00266-F
# -1 ??? # 00000
#001 \M5.$ZTN00.#PTUGRB0 # 00000
050,03,00266-DN 0x08000000 + %H2, #5
08000002: 0x01000000 0x0003010A 0x00000000 0x000BDB4C
08000012: 0x00000032
050,03,00266-FC
DN 0x08000000 + %H2, #5
............. :D
DN 0x08000000 + %H2, #5 :D
.............
08000002: #00256 #00000 #00003 #00266 #00000 #00000 #00011 #56140
08000012: #00000 #00050