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-23
Accelerated Program Example
The memory-access breakpoint is triggered when anything is written to the 16-bit word.
In this case, we get two interrupts at EXAMPLE_FILL_ARRAY + %41: one when the
"e" is put into the word, and another when the "n" is put into the word. This double
interrupt is true only when the code putting the data in the memory location is doing
byte operations and the code is not PRIV. The next break happens after the data is
entered. In the second case, the data is transferred in the PRIV system procedure, so
the breakpoint is reported after the end of the PRIV procedure.
Accelerated Program Example
Debugging accelerated programs is similar to debugging TNS programs, with some
differences between the two. In this subsection, we discuss the differences between
TNS and accelerated programs.
To generate an accelerated object file, we use the demo1 program in Example F-2 on
page F-4 and get an accelerated program as follows:
AXCEL demo1,ademo1. Because the ademo1 object file does not have significant
information, the listing is not provided here. For more information about using the
Accelerator refer to the Accelerator Manual.
Break Command
We run the ademo1 object file and put a breakpoint at EXAMPLE_INIT procedure.
When we specify the B command in an accelerated program, we are actually entering
two breakpoints, one in TNS code and another in RISC code.
Using of the B command to insert a TNS code breakpoint and using the B* command
to insert a RISC code breakpoint:
RUND ademo1
DEBUG P=%000211, E=%000207, UC.%00
050,03,00032-b %5
@ ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
050,03,00032-r
DEBUG P=%000005, E=%000207, UC.%00-BREAKPOINT-
050,03,00032-b ! TNS breakpoint
@ ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
050,03,00032-b * ! RISC breakpoint
@ ADDR: UC.%00,%000005 INS: %002035 SEG: %020737
INS: ADDS +035
^--N: 0x7042001C INS: 0x27BD004E
INS: ADDIU sp,sp,78