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-46
Native Program Example
procedure after the SP register has been set up, so that we point to the correct location
for ARRAY_NUM. First we run the program as follows: RUND ndemo1.
The ARRAY_NUM variable is a 16-bit (2 bytes long) number, so we enter the condition
address as a 32-bit address without an N prefix. If we want to have a conditional
breakpoint on a 32-bit number, we would prefix the conditional address with the N.
Execute Breakpoint
The next example shows the execute breakpoint using the BM command. First we run
the pTAL compiled listing: RUND ondemo1.
We put a memory-access breakpoint on the first 16-bit word of data pointed to in the
IN_OUT_MESSAGE array of the EXAMPLE_FILL_ARRAY procedure. We stop near
the beginning of EXAMPLE_FILL_ARRAY and look at the data in IN_OUT_MESSAGE.
The data in the current location is junk, left on the stack from the EXAMPIL_INIT
procedure that we used in previous examples.
050,03,00267-b 0x70000478
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
050,03,00267-r
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00267-c
050,03,00267-b 0x70000478, 0x4FFFFEEA > #16
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
%047777.177352 & %177777 > %000020
050,03,00267-r
enter some data
abcdefg
enter some data
lmnopqrst
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00267-dn $sp+%h82 :d
4FFFFEEA: #00017 #00000
050,03,00269-b 0x70000478
N: 0x70000478 INS: 0x3C048000
INS: LUI a0,0x8000
050,03,00269-r
DEBUG $PC=0x70000478 -RISC BREAKPOINT ($PC: 0x70000478)-
050,03,00269-dn $SP + %H4c, %h30/4 :a
4FFFFEB4: .$ZTN. .00.#. .PTK9. .AAB..
4FFFFEC4: ...... ...... ...... ......
4FFFFED4: ...... ...... ...... ......