Native Inspect Manual (H06.13+, J06.03+)

Creating a Snapshot File
You can create snapshot files in several ways, as follows:
Using the save command (Native Inspect)
Using the Save Snapshot command (Visual Inspect)
Using the SAVE command (Inspect)
Snapshot files are also created by the snapshot server (INSPSNAP) if the SAVEABEND attribute for
a process is ON and the process abends.
Opening a Snapshot file
Use the Native Inspect snapshot command to open a snapshot file, providing a read-only view
of the state of the process that the snapshot represents.
To open a snapshot file, start Native Inspect and then enter the following command:
(eInspect 3,301): snapshot $disk3.mysubvol.myprog
where $disk3.mysubvol.myprog is the name of a TNS/E native snapshot file (file code 130)
located on the TNS/E system.
Snapshot File Considerations
You can examine only one snapshot file at a time, and you cannot debug a process at the
same time. You cannot execute any Native Inspect commands that would alter the state of the
snapshot, or commands that would execute a process, such as step or continue. Such commands
report an error during snapshot analysis.
If the snapshot was created in a different location from its present location, you might need
to manually load symbols for loadfiles (using the symbol command or symbol-file
command,) and set a source search path (using the dir command).
Debugging DLLs
Dynamic-link libraries (DLLs), which contain position-independent code (PIC), are the standard user
libraries on TNS/E systems. DLLs can be implicitly loaded by the system when a program is started
or explicitly loaded and unloaded by program calls to dlopen() and dlclose(), respectively.
Suspending Process Execution on DLL Events
You can use the LOAD and UNLOAD options with the catch command to gain control when a DLL
is loaded or unloaded, respectively.
Listing DLLs
Native Inspect maintains a list of the loadfiles that compose the current program. You can display
the list of loadfiles by entering the info command with the dll option.
Loading Symbols for DLLs
Native Inspect automatically loads symbols for the program file and for explicitly loaded DLLs. You
must explicitly load symbols for other DLLs using the symbol command or symbol-file command.
To explicitly add additional symbol files at a specific address, use the add-symbol-file
command.
Addressing Symbols for DLLs Loaded at Another Address
If a user loads a symbol file for a DLL before a program call to dlopen() to load the DLL, Native
Inspect uses the preferred address of the DLL as the basis for symbol address calculations. Then,
28 Introducing Native Inspect