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-8
TNS Program Example
address 1 and is 10 16-bit words long. For information about how we obtained these
numbers, see Example F-2 on page F-4. Here, we omit UD for the address because
UD is the default option for the D command. The commands entered and the outputs
displayed:
Using Extended Addressing
At this point in the EXAMPLE_INIT procedure, the local extended integer pointer,
HANDLE_PTR, located at L + 2, has been set to the program’s global array,
PROCESS_HANDLE, starting at UD + 1. We can display the information in
PROCESS_HANDLE using two methods: reading the pointer address stored at L+2
and L+3 and then using that address to display the information in
PROCESS_HANDLE, or we can use the extended integer indirect clause in the
address part of the D command.
When displaying the extended pointer, we will set the display format to group in 4
bytes, thus using B4. For the second part of the display, we need to divide the
extended pointer value by 2 because extended pointers are byte-aligned and the
address specified to the D command must be word aligned when referencing the user
data area. Both methods are shown here:
BASE Command
Most Debug commands have default base for numeric input and output. The default
input can be overridden by prefixing the number with the appropriate numeric prefix (%
for octal, # for decimal, or 0x or %h for hexadecimal). The default output of some
Debug commands can be changed with an output base as was shown in the previous
050,03,00013-d 1, #10
%000001: %000400 %000000 %000003 %000015 %000000 %000000 %000014 %130212
%000011: %000000 %000062
050,03,00013-d 1, #10 :d
%000001: #00256 #00000 #00003 #00013 #00000 #00000 #00012 #45194
%000011: #00000 #00050
Note. Because Debug is not case-sensitive, you can use lowercase or uppercase letters when
entering Debug commands.
050,03,00013-D L+%2, %2 , B4 :h
%000024: 0x00000002
050,03,00013-d 0x00000002 /2, #10 :D
%000001: #00256 #00000 #00003 #00013 #00000 #00000 #00012 #45194
%000011: #00000 #00050
050,03,00013-D L+%2IX, #10 :D
%000001: #00256 #00000 #00003 #00013 #00000 #00000 #00012 #45194
%000011: #00000 #00050