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-10
TNS Program Example
is to enter the sum of the offset and the base %255 (44 + 211), as shown in the
example below. After entering the breakpoints we resume to the location.
Modify Command
Here, we demonstrate the use of the modify (M) command. At this point in our
example, we simulate an error returned from a call to the SEGMENT_ALLOCATE_
procedure by modifying the value in the ERROR_MAIN variable, located at L 1, to
have a nonzero value. First we display the location for ERROR_MAIN, then modify
the location.
We resume to see the call to Debug. We display the value in the ERROR_MAIN
variable in an octal format (default) and in a decimal format. We then resume to the
next breakpoint.
Again, we simulate an error returned from the call to the SEGMENT_ALLOCATE_
procedure by modifying the value in the ERROR_MAIN variable to have a nonzero
value. This time we use the M command interactively:
050,03,00013-B %211+%21
ADDR: UC.%00,%000232 INS: %040401 SEG: %020737
INS: LOAD L+001
050,03,00013-B %255
ADDR: UC.%00,%000255 INS: %040401 SEG: %020737
INS: LOAD L+001
050,03,00013-R
DEBUG P=%000232, E=%000217, UC.%00-BREAKPOINT-
050,03,00013-D L 1
%000016: %000000
050,03,00013-M L 1, -1
Note. A call to Debug produces a different message at the stop than when we hit a
breakpoint.
050,03,00013-R
DEBUG P=%000236, E=%000227, UC.%00
050,03,00013-D L 1
%000016: %177777
050,03,00013-D L 1 :D
%000016: #65535
050,03,00013-R
DEBUG P=%000255, E=%000217, UC.%00-BREAKPOINT-
50,03,00013-M L 1
%000016: %000000 <- 4
%000017: %000000 <-
050,03,00013-R
DEBUG P=%000261, E=%000207, UC.%00