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-32
Native Program Example
Checking for Open Files
We check for open files using the find (F) command. We find that there is no open file
at this point in our example.
We advance to the breakpoint at the end of the EXAMPLE_INIT procedure using the
resume command, and verify our location with the LMAP command:
N-address Mode
We look at the various data locations again:
We used the value found for HOMETERM_LEN at $SP + %H7E for the length of the A
command. We rounded the result up to the next even number before dividing by 2. We
also specified the output to be displayed in byte-form instead of 16-bit word-form. (The
letters C or B1 could have been used instead of B for the same result.)
In executing the above commands, we used the N-address mode. This is a common
practice with native programs, because they use 32 bit-words and hexadecimal values
more often than TNS or accelerated programs.
DN Command
Many programmers prefer to use the DN command for displaying output information.
For working with 32-bit operations, the 32-bit byte-form is used (programmers do not
need to convert from 16-bit word-form). Also, twice as much information is displayed
and hexadecimal is the default display format. In the following example, we display the
variables discussed above using the DN command.
050,03,00266-F
# -1 ??? # 00000
050,03,00266-R
DEBUG $PC=0x7000045C -RISC BREAKPOINT ($PC: 0x7000045C)-
050,03,00266-LMAP $PC
EXAMPLE_INIT + 0xCC (UCr)
050,03,00266-D N 0x08000000, 1 :H
08000000: 0x0001
050,03,00266-D N $SP + %H7E , 1:D
4FFFFEAE: #00019
050,03,00266-A N $SP + %H80, #20/2, B
4FFFFEB0:\M5.$ZTN00.#PTUGRB0.