Migrating from Inspect to Native Inspect

Migrating from Inspect to Native Inspect
Hewlett-Packard Company 543427-002 7 of 15
Note: For DLL loadfiles, Native Inspect uses
the actual load address to address variables. If
you need to override use of the actual address,
the add-symbol command allows you to
specify a base address when loading the file.
DLLS
Dynamic link libraries (DLLs) are standard
on TNS/E systems. As a result, your
program run-time image will be composed
of system DLLs, language run-time DLLs,
and any DLLs that you define.
To list information about the DLLs that
compose your program, use this command:
info dll
To load missing symbols for any DLLs, use
the symbol-file or add-symbol-
file commands (see Locating Symbols on
page 6).
As of H06.07, you can use the following
commands to suspend program execution
when a DLL is loaded or unloaded:
catch load [dllname]
catch unload [dllname]
Data Segments
The vq command is similar in function to
the Inspect INFO SEGMENTS command.
When specified with no arguments, vq lists
all data segments. Specifying a segment id
as an argument changes the selectable
segment relative to which Native Inspect
displays process state (Inspect SELECT
SEGMENT).
Snapshot Files
Snapshot files, also referred to as save or
save abend files, store the user process
state of a process for later post-mortem
debugging.
The system automatically creates snapshot
files when a process with the SAVEABEND
attribute set calls ABEND to terminate. To
create a snapshot file in Native Inspect, use
the save command.
To use Native Inspect to examine a TNS/E
snapshot file, start Native Inspect and use
this command to load the file:
snapshot filename
Note: You will likely need to load symbols and
might need to point to alternative source file
locations. For more details, see Locating Source
and Symbols on page 6.
Note: You can only examine one snapshot file at
a time with an eInspect session. To examine
multiple files at the same time, run eInspect in
multiple terminal sessions.
Scripting
Inspect scripting capabilities were limited to
placing sequences of commands in a file that
you could then execute using the OBEY
command.
Like Inspect, Native Inspect allows you to
execute commands from a file.
Unfortunately, the command to do so is
named source, which has a much different
meaning in Inspect.
The integrated TCL (Tool Control
Language) interpreter in Native Inspect
supports the development of sophisticated
debugging scripts. For example:
File: myTCL:
proc allbases { args } {
set result [matheval $args]
set char [ASCII $result]
PUT "\nOCT: [format %06o $result]"
PUT "DEC: [format %-5d $result]"
PUT "HEX: 0x[format %04x $result]"
PUT "ASCII: \'$char\'\n"
}
From Native Inspect:
(eInspect) tcl source mytcl
(eInspect) allbases 304
OCT: 000460 DEC: 304 HEX:
0x0130 ASCII: '...0'