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-13
TNS Program Example
Displaying String Output
The local buffer, IN_OUT_MSG, is an indirect string. This means that we need to use
the pointer at L 3 to find the address of the data, divide it by 2 to convert from a string
address to a word address, then display the information. We can do this in one step or
two steps by using the indirect form as shown below:
Displaying Data Using Q Address
We can display some data in the selectable segment using the Q address mode. The
extended indirect pointer, SP, is 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 hexadecimal output format.
We can also see the results of moving the procedure's buffer into the selectable
segment. Because the data is stored at byte offset 41, we need to round down to the
previous even byte (40). We then divide by 2 to convert to a 16-bit word address offset.
050,03,00013-d l 3
%000026: %000062
050,03,00013-a %62/2, #8/2, c
%000031:abcdefgo
050,03,00013-a l3s, #8/2, c
%000031:abcdefgo
Note. The last character returned is an "o," because we use the same buffer for input and
output. The "o" is from the word "some" in our prompt string "enter some data." An additional
item to note about the above example: The address 62 (octal) returned from the D L 3
command is in the user data (UD) area. We could have entered the A command as A
UD,%62/2, #8/2,C to obtain the same result. In other words, if a space qualifier is not specified
for the A or D command, UD is assumed.
050,03,00013-d q0, c :h
%000000: 01 00
050,03,00013-a q #40/2, #10/2, c
%000024:.abcdefg..