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

Debug Manual—421921-003
F-1
F Sample Debug Sessions
This section of the manual provides step-by-step demonstrations of using Debug 
commands for debugging TNS, accelerated, and native programs. For more 
information on TNS programs, accelerated programs, and native programs, see 
Section 2, Using Debug on TNS/R Processors in this manual.
We provide the source listing (Example F-1 on page F-2), which can be compiled with 
either a TAL or pTAL compiler. We also provide TNS and native program listings. 
When going through the examples, you should refer to the compiled listings; otherwise, 
the examples will not make much sense to you.
Overview of Example Program
The first few lines of the source code listing show declarations of various procedures. 
For more information about these procedures, see the Guardian Procedure Calls 
Reference Manual. Following the procedure declarations, there are three global 
variables, INT MY_TERMNUM, INT array PROCESS_HANDLE, and an extended 
STRING pointer SP that is initialized to starting address of 2000000 (octal).
Following the global variables, there is the EXAMPLE_INIT procedure, which has a set 
of local variables and some code that uses some of the procedure declared at the 
beginning of the program. The code manipulates both local and global variables. Note 
that the EXAMPLE_INIT procedure opens a terminal file. We will write data to and read 
data from this file to demonstrate the use of various Debug commands.
The EXAMPLE_FILL_ARRAY procedure takes a single parameter. This procedure 
also has some local variables and code. The code manipulates global and local 
variables. This procedure reads and writes the terminal opened by the EXAMPLE_INIT 
procedure.
Finally, we have the EXAMPLE_MAIN procedure, which is declared as the MAIN of the 
program. This procedure calls the EXAMPLE_INIT procedure, allocates memory 
segments, then calls the EXAMPLE_FILL_ARRAY procedure several times, passing in 
a different memory segment number on each call.
Example Program Page
TNS Program Example
F-3
Accelerated Program Example F-23
Native Program Example F-28
Privileged Commands F-49










