Native Inspect Manual (H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introducing Native Inspect
- Native Inspect on TNS/E Systems
- Debuggers on NonStop TNS/E Systems
- Origins of Native Inspect
- Process Debugging With Native Inspect
- Debugging Multiple Processes
- Global Debugging
- Debugging TNS Processes
- Snapshot File Analysis
- Debugging DLLs
- Handling Events
- Switching Debuggers (To or From Inspect and Visual Inspect)
- Stopping Native Inspect
- Differences Between Native Inspect and WDB and GDB
- 2 Using Native Inspect
- Quick Start for Inspect Users
- Preparing to Debug Using Native Inspect
- Sample Native Inspect Session
- Start Your Program Under Native Inspect
- Load Symbols
- Determine Compilation-Time Source Name
- Set Source Name Mapping
- Add Current Directory to Source Search Path
- List Source
- Set a Breakpoint on main()
- Continue Execution
- Trace the Stack (Back Trace)
- List Source
- Step Execution (Over Any Function Calls)
- Print a Variable
- Step Execution (Over Any Function Calls)
- Step In to a Called Function
- Set a Memory Access Breakpoint (MAB)
- Trace the Stack (Back Trace)
- List Source
- Continue Listing Source
- Set a Breakpoint on Line 52
- Continue Execution
- Display a Structure
- Enable “pretty” Printing
- Modify a Structure Field
- Terminate Program and Session
- 3 Syntax of Native Inspect Commands
- Categories of Native Inspect Commands
- Syntax of Common Command Elements
- # command
- a command
- add-symbol-file command
- amap command
- attach command
- base command
- break command, tbreak command
- bt command
- can command
- cd command
- commands command
- comment command
- condition command
- continue command
- d command
- delete command
- delete display command
- detach command
- dir command
- disable command
- disable display command
- disassemble command, da command
- display command
- dmab command
- down command, down-silently command
- enable command
- enable display command
- env command
- eq command
- exit command
- fc command
- files command
- finish command
- fn command
- frame command, select-frame command
- help command, help option
- hold command
- i command
- ignore command
- ih command
- info command
- jb command
- jump command
- kill command
- list command
- log command
- ls command
- mab command
- map-source-name command
- mh command
- modify command
- next command, nexti command
- nocstm option
- output command
- print command
- priv command
- ptype command
- pwd command
- quit command
- reg command
- save command
- select-frame command
- set command (environment)
- set command (variable)
- show command
- snapshot command
- source command
- step command, stepi command
- switch command
- symbol command, symbol-file command
- tbreak command
- tj command, tu command
- tn command
- unload-symbol-file command
- until command
- up command, up-silently command
- vector command
- version option
- vq command
- wait command
- whatis command
- x command
- 4 Using Tcl Scripting
- A Command Mapping With Debug and Inspect
- Glossary
- Index

Introducing Native Inspect
Native Inspect Manual—528122-003
1-16
Using One Instance of Native Inspect to Debug
Multiple Processes
Using One Instance of Native Inspect to Debug Multiple
Processes
You need to be mindful of which process is the current process (as indicated by the
CPU pin in the eInspect prompt). With Native Inspect, most debugging options (such
as the directory search path) are defined as attributes of the debugger instance, not as
values associated with the current process.
Suppose that you are debugging two interacting processes. If you are stepping
execution in process A, which causes a breakpoint in process B to be hit, process B
becomes the current process. Advancing execution in process B might then result in
completion of the step of process A, causing it once again to be the current process.
In this situation, you will see the process ID of process A (3,301) displayed in the
Native Inspect prompt, and then the process ID of process B in the next prompt from
Native Inspect (3,38). For example:
(eInspect 3,301): step
(eInspect 3,38):
Considerations for Multi-Process Debugging
•
Native Inspect can debug only those processes that are executing in the same
CPU in which the instance of Native Inspect is running.
For example, if a TNS/E native process running in CPU 3 calls Debug, and Native
Inspect is invoked as the debugger, the instance of Native Inspect must run in CPU
3.
•
Native Inspect checks only for events at times when events are expected for the
current process—such as after process execution commands (or the wait
command). Native Inspect cannot receive events while prompting for user input.
Debugging events that occur for other processes are not necessarily reported
when they occur, but are reported after you enter a process-control command
(such as continue, step, or next) or the wait command.
•
Pressing the Break key interrupts waiting for a debugging event and redisplays the
Native Inspect command prompt, but cannot be used to interrupt other commands.
•
When debugging multiple programs, Native Inspect, like Inspect, sets the
designated current process to be the process for which the most recent debugging
event has been reported. The current process is the process to which all
commands apply and for which Native Inspect waits for events.
•
Use the vector command to explicitly change the designated current process.
•
In a rare situation, two instances of Native Inspect can be running on different
CPUs but be prompting the same home terminal. In this situation, you should:
°
Start another Native Inspect on that CPU.
°
Attach to the process from the new Native Inspect.










