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-19
TNS Program Example
Additional Breakpoint Options
Next, we demonstrate some variations on the B and BM commands. We run the object
file in Example F-2 on page F-4 several times to show the various options with the B
and BM commands. The first example will show the breakpoint tracing.
We put a breakpoint near the beginning of the EXAMPLE_FILL_ARRAY procedure
and show the content of the ARRAY_NUM parameter. We also put a breakpoint at the
end of EXAMPLE_FILL_ARRAY and show the data in the selectable segment at a 40-
byte offset for 16 bytes.
In order to ensure that the output values are within the scope of the procedure we are
debugging, we need to make sure that the address reference in the trace clause is
evaluated within the context of the procedure. So, we put a breakpoint after the stack
has been set up and resume to the breakpoint. First we look at the code to find an
appropriate location at put the breakpoint. In this case, this location is right after the
stack has been set up and initialized.
We then clear the breakpoint and put in another breakpoint with the trace clause.
050,03,00009-i %104, 20
%000104: ADDS +002 LADR L+006 LLS 01 PUSH 700
%000110: ADDS +032 LOAD L-003 PUSH 700 ADDS +006
%000114: LDLI +200 LDI -007 PUSH 711 XCAL 006
%000120: STOR L+002 LOAD L+002 CMPI +000 BEQL +001
050,03,00009-b %117
ADDR: UC.%00,%000117 INS: %127006 SEG: %020707
INS: XCAL 006
050,03,00009-r
DEBUG P=%000117, E=%000227, UC.%00-BREAKPOINT-
050,03,00009-c
050,03,00009-b %117, l-3 ? 1
ADDR: UC.%00,%000117 INS: %127006 SEG: %020707
INS: XCAL 006
L %177775 ? %000001
050,03,00009-b %104+%73, n 0x00080028 ? #16/2
ADDR: UC.%00,%000177 INS: %125004 SEG: %020707
INS: EXIT 04
N 0x00080028 ? 0x00000008