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-14
TNS Program Example
Displaying Data Using Extended Address
The EXAMPLE_FILL_ARRAY procedure does not update the extended indirect pointer
SP located at the program’s global 12, so it is pointing to the beginning of the
selectable segment. We can repeat the A and D commands above, using SP as a
string extended address.
In this case, because the S indirection type indicates a string (byte), index is a byte
offset, which eliminates the need of dividing the address by 2. Instead of using the a q
#40/2, #10/2, c command in the above example, we can also enter it as: a
ud,12sx#40,#10/2,c.
The EXAMPLE_FILL_ARRAY procedure has a local extended string pointer,
SEGMENT_PTR, located at L 4. The pointer is set to offset 41 of SP. We can repeat
the A commands above, using SEGMENT_PTR.
We resume the program so that it stops the next time we reach the end of
EXAMPLE_FILL_ARRAY procedure. The ? command shows us which segment is in
use.
050,03,00013-d 12ix, c :h
%000000: 01 00
050,03,00013-a 12sx + #40, #10/2, c
%000024:.abcdefg..
Note. For the A command, we are using this address form:
offset [indirection-type [index]].
050,03,00013-a L4sx, #10/2, c
%000024:.abcdefg..
050,03,00013-r
enter some data
tuvwxyz
DEBUG P=%000174, E=%000207, UC.%00-BREAKPOINT-
050,03,00013-?
USE SEGMENT ID = %000002
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTAZJAC
PRV = OFF