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-29
Native Program Example
SEGMENT_PTR STRING EXT POINTER
%H48 %H4 LOCAL VARIABLE
9.300 1 0 PROC example_main MAIN;
10. 1 1 BEGIN
11.020 1 1 INT error_main;
11.030 1 1 INT error_detail;
12. 1 1 example_init;
12.007 1 error_main := SEGMENT_ALLOCATE_ (1, 131064D, !filename;len!,
error_detail);
12.020 1 1 IF error_main <> 0 THEN
12.021 1 1 DEBUG;
12.022 1 error_main := SEGMENT_ALLOCATE_ (2, 131064D, !filename;len!,
error_detail);
12.030 1 1 IF error_main <> 0 THEN
12.031 1 1 DEBUG;
12.032 1 error_main := SEGMENT_ALLOCATE_ (17, 258000D, !filename;len!,
error_detail);
12.040 1 1 IF error_main <> 0 THEN
12.050 1 1 DEBUG;
12.200 1 1 example_fill_array (1);
12.300 1 1 example_fill_array (2);
13. 1 1 example_fill_array (17);
14. 1 1 END; -- example_maim
ERROR_DETAIL INT(16)
%H44 %H2 LOCAL VARIABLE
ERROR_MAIN INT(16)
%H46 %H2 LOCAL VARIABLE
Global Map
MY_TERMNUM INT(16)
%H0 %H2 _GLOBAL
PROCESS_HANDLE INT(16) [0:9]
%H2 %H14 _GLOBAL
SP STRING EXT POINTER
%H18 %H4 _GLOBAL
To make the program executable, we must also run NLD on the compiled object to
create an executable object. We use this command:
NLD tdemo1 -o ndemo1 -set inspect off -s
We also need to get some address information about various procedures from the
noft listing. For more information about using noft, see the nld Manual and the noft
Manual. For our example, we specify noft commands as follows:
NOFT out $s.#lndemo1;f ndemo1; lp * d