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-40
Native Program Example
breakpoint that is at the end of the procedure. Using the ? command, we see that 
segment 1 is being used.
Displaying Data Using Q Address
We can display some data in the selectable segment using the Q-address mode. The 
extended indirect pointer, SP, was used to store the ARRAY_NUM in location 0 of the 
selectable segment. We can separate the characters by using the C grouping option 
and the hexadecimal output format.
We can also see the results of moving the procedure's buffer into the selectable 
segment. Because the data was stored at byte offset 41, we need to round down to the 
previous even byte (40). We then divide the offset 40 by 2 to convert to a 16-bit word 
address.
Displaying Output in Hexadecimal
Note that the output address, for the commands we used above, is given as 16-bit 
word offsets in octal. To see the hexadecimal byte offset, we can use the DN 
command. However, we need to first get the 32-bit address of the selectable segment. 
AMAP Command
We use the AMAP command to get the 32-bit address of the selectable segment. 
050,03,00266-r
enter some data
abcdefg
DEBUG $PC=0x70000568 -RISC BREAKPOINT ($PC: 0x70000568)-
050,03,00267-?
USE SEGMENT ID = %000001
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTUGRB0
PRV = OFF
050,03,00266-d q 0, c :h
%000000: 01 00
050,03,00266-a q #40/2, #12/2, c
%000024:.abcdefg....
050,03,00266-AMAP Q
Address: 0x00080000
Kind = 0x0013: Unknown
Attributes: none










