Migrating from Inspect to Native Inspect

Migrating from Inspect to Native Inspect
6 of 15 Hewlett-Packard Company 543427-002
Modifying Variables
To modify a variable, use either of these
commands:
print variable = value
set variable variable = value
The value can be a constant, another
variable, or the result of an expression.
GDB Gotcha: The variable clause of the
set command is optional but must be specified
if the name of the variable is the same as a
debugger option, listed by the show command.
Locating Source and
Symbols
Locating Source
If executable files or the source files
compiled to create them are relocated,
Native Inspect displays an error indicating
that it cannot locate the source file at the
compiled location recorded in the object file.
You must then specify how to locate the file.
If the file was relocated to another
subvolume or directory but has the same
base name, use the command:
dir dir-or-subvol
Native Inspect searches that location for
source files. When you specify the dir
command with no argument, Native Inspect
asks you if you want to clear the search path.
If the base filename has changed, which is
common when moving source files from a
cross-development environment to
Guardian, you must use the map command
to specify an alternative location:
map [[ original ] = current]
You can specify fully qualified original and
current file names or (as of H06.07) you
can specify file name prefixes. When you
specify prefixes, Native Inspect attempts to
match the original prefix against
subsequently referenced source filenames. If
there is a match, the original prefix is
replaced by the current prefix and the file
mapping is added to the file mapping list.
Omitting all arguments lists the contents of
the file mapping list. You can omit the
current original name when defining a
mapping for the file from which you are
currently listing source. Use the umap
command to delete a mapping.
Inspect Difference: Native Inspect does not
support automatic rules for mapping file-name
extensions to Guardian file names.
Locating Symbols
When the development cycle is complete,
loadfiles are commonly stripped of symbols
to save disk space. When debugging such a
program, you might notice this message:
(no debugging symbols found)...
You will also find that source file names and
line numbers are missing in the stack trace
and that you cannot reference variables or
list source.
Whereas Inspect required you to specify
alternative symbol files when adding or
selecting a program, Native Inspect allows
you to do so at any time during the
debugging session. Use this command:
symbol-file filename
As with Inspect, you must make sure that
the symbols correspond to the loadfile being
debugged. (Native Inspect issues a warning
if the compilation timestamps differ.)
Note: You will also often need to load symbol
files when examining process snapshot files.
To list loaded symbol files, use this
command:
info symbol-files
To delete a loaded symbol file, use this
command:
unload-symbol-file