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-15
TNS Program Example
VQ Command
The ? command above shows that segment ID 2 is in use. The VQ command allows us
to switch to any segment available to the program. In this example, we first use the VQ
command to switch to segment 1, which had the “abcdefg” data inserted the last time
the EXAMPLE_FILL_ARRAY procedure was called. We then modify the data at
location 0x2ff0 in the segment to demonstrate the FN command.
FN Command
We can use the FN command to find the location of a 16-bit word that matches a
value. The value must be aligned on an even-byte address boundary. The "abcdefg"
we entered earlier was placed into the selectable segment 1 starting on an odd byte
(41), so we start looking for the "bc" part of the character segment, which starts at an
even byte. We have also modified the selectable segment with "bc" at offset 0x2ff0,
which is an even address.
Pressing return on the (FN) prompt caused the FN command to continue searching.
After the second return, we encountered the end of the selectable segment and an
error was reported. Note that the addresses are given in octal word offsets, followed by
the contents of the 16-bit word.
050,03,00013-vq 1
050,03,00013-?
USE SEGMENT ID = %000001
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTAZJAC
PRV = OFF
050,03,00013-m q 0x2ff0,'bc'
050,03,00013-fn q 0, 'bc'
%000025: 0x6263
050,03,00013 (FN)-
%027760: 0x6263
050,03,00013 (FN)-
DEBUG error 50: FN stopped searching at the following address:
0x0009FFF8
Address not valid