Native Inspect Quick Reference Card

H
Native Inspect
Quick Reference Card
Part #: 544998004 Feb 201 2 - (C)2012 Hewlett- Packard L.P
Starting Debugging Sessions
Compile the program files with symbols and at optimization
level 1 (or 0).
If in a PC-based development environment, transfer the files to
a TNS/E host.
Launch Native Inspect and gain debugging control.
To customize your sessions, modify the EINSCSTM custom file
in your logon default volume.subvolume.
Manual Startup Options
If you start Native Inspect manually, you can enter the following
command options:
nocstm
- Ignore the custom file.
version
- Display the debugger version.
help
- Display the online help.
Starting processes under debugger control in TACL or OSS:
TACL> rund
filename
OSS> run -debug
filename
Starting the debugger on a running process:
TACL> debug [processname], term [
term_name
]
OSS> debug [
cpu_id
] [
process_id
]
Invoking the debugger from a running TNS/E native process:
A call to PROCESS_DEBUG or DEBUG.
Encountering a previously-set breakpoint.
User switches debuggers to Native Inspect.
Use the attach [
pin
] | [$
process-name
] command from
within Native Inspect. (The process must run in the same CPU.)
Traps and signals can cause the debugger to start automatically.
Stopping Native Inspect
To manually stop Native Inspect, enter:
exit
or
quit
.
Native Inspect automatically stops when its target process
stops.
Snapshot Files
Snapshot files save a process state for later analysis
save filename [compression] [!] Provides control
over the compression that is applied to the file.
compression can be one of bzip2, gzip, or none, and this
applies when debugging a 64-bit process.
Set the compiler option SAVEABEND to ON - Creates snapshot
files automatically when a process abends.
snapshot [pathname] - Examine a snapshot
Switching Debuggers
switch - Switch to Inspect or Visual Inspect.
Switch to System Debugger - Switch to Native Inspect from
Visual Inspect.
SELECT DEBUGGER DEBUG - Switch to Native Inspect from
Inspect.
Utility Commands
amap [
address
] - Displays attributes associated with an
address.
base {input | output} {HEX | OCT | DEC} - Sets
the base for numeric input and output.
cd [
pathname
] - Changes the current working directory.
{comment | #} [
text
] - Precedes a comment line.
eq [
expression
] - Evaluates an expression and displays the
result in several bases.
fc [command-number | command-string]
- Redisplays a command for editing and execution.
{files | ls} [pattern] - Displays the files in the current
working directory.
fopen [file-num ] [-d ] - Displays information about the
files opened by the current program.
info attribute - Displays information about the debugging
target.
log [pathname | -d] - Turns session logging on or off.
pwd - Prints the current working directory.
{quit | exit} - Ends a session.
set
attribute
value
(Environment) - Establishes
environment settings.
show [attribute | {history | print | check}
[sub-attr]] - Displays environment settings.
source [pathname] - Reads debugger commands from a file.
which
symbol
- Prints file, function, and line information of the
specified (text or data) symbol.
Source File Commands
dir [directory] - Specifies the search path used to
locate source files when they can not be found at their
compile-time location.
list [
start-linespec
][,
end-linespec
] [+|-] - Lists
source code.
{map-source-name | map} [[
source-name
]=
alias-
name] | [source-prefix=alias-prefix] - Defines
mapping rules between the compile-time name and location
of a file and its current name and location. (Useful when a
file is renamed).
Controlling Sessions
attach [
pin
] | [$
process-name
] - Associates Native
Inspect with a process that is executing in the same CPU.
detach [
pin
] | [$
process-name
] - Disassociates
Native Inspect from the current process.
{next | nexti} [
count
] - Advances program execution
by one or more statements, stepping over function calls.
priv {on | off} - Controls the privilege level of the
working session (super user only).
switch - Transfers the current process to another debugger.
vector [
pin
] | [$
process-name
] - Changes the
current process.
wait - Suspends prompting pending the next debug or
Break key event.
Controlling Processes
continue [
ignore-count
] - Resumes execution of the
current process.
finish - Executes the current process until execution returns
from the currently selected frame.
hold - Suspends the current process so that you can perform
debugging operations.
jump
linespec
- Resumes execution at the specified
location.
kill - Terminates the current process.
{step | stepi} [
count
] - Advances program execution
by one source statement or a specified number of
statements, stepping into any called functions.
until [linespec] - Continues execution of the current
process until a specified location is reached or until the
current stack frame returns.
Controlling Execution
mh
signal-name
{SIG_IGN | SIG_ABORT | SIG_DFL
| SIG_DBG | native-address} - Modify signal handlers
for a specified signal (modify handler).
ih [signal-name] - Display information about signal
handlers (info handler).
Controlling Breakpoints
{break | tbreak} [
linespec
] [
flags
] [-e
llce
|
if cond-exp] - Sets an instruction breakpoint (temporary,
for tbreak).
catch event - Sets a logical breakpoint on a specified
event.
commands breakpoint-number - Specifies commands
that execute at a specified breakpoint.

Summary of content (2 pages)