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-6
TNS Program Example
Thus, we enter UC.0,%5 at the prompt, which gives us the breakpoint at the beginning
of EXAMPLE_INIT procedure:
Selecting a location near the end of the EXAMPLE_INIT procedure, we find that
relative offset 76 (octal) is near the end of the procedure. Thus, adding 76 (octal) to
the starting location gives us the ending breakpoint location of the procedure.
We resume the program and get to the first breakpoint as follows:
LMAP Command
The P value indicates that we have hit the breakpoint at the beginning of the
EXAMPLE_INIT procedure. You can confirm this by passing the P register to the
LMAP command as follows:
Displaying Variable Values
We can look at the before contents of the program’s global variable MY_TERMNUM,
located at the program’s GLOBAL + 0, and the EXAMPLE_INIT procedure variables
HOMETERM_LEN and HOMETERM. HOMETERM_LEN and HOMETERM are
located at L + 34 and L + 4 (octal), respectively. (See the object program listing in
Example F-2
on page F-4.) We use the D command for displaying numeric variables
and the A command for displaying string variables,
We used #48/2 for the length of the A command based on the declaration of the
HOMETERM array. The array was declared as [0:47], which is 48 (decimal) bytes long.
050,03,00013-B UC.0,%5
ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
Note. The octal prefix, %, is used in our examples to emphasize the numeric base of the
numbers shown.
050,03,00013-B UC.0,%5+%76
ADDR: UC.%00,%000103 INS: %125003 SEG: %020737
INS: EXIT 03
050,03,00013-R
DEBUG P=%000005, E=%000207, UC.%00-BREAKPOINT-
050,03,00013-LMAP P
EXAMPLE_INIT (UC.00)
050,03,00013-D UD,%0
%000000: %000000
050,03,00013-D L%34
%000056: %000000
050,03,00013-A L%4, #48/2, B
%000026................................................