HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)

a
adb(1) adb(1)
NAME
adb - absolute debugger
SYNOPSIS
adb [-h]
adb [-n-o][
-w][-I path] kernelfile memfile
adb [-n-o][-w
][-I path] kernelfile crashdir
adb [-n-o][-w
][-I path] crashdir
adb [-n-o][-w
][-I path][objfile][corefile]
adb [-n-o][-w
][-I path] -P pid [execfile]
DESCRIPTION
The
adb command executes a general-purpose debugging program that is sensitive to the underlying archi-
tecture of the processor and operating system on which it is run It can be used to examine files and provide
a controlled environment for executing HP-UX programs.
adb inspects exactly one object file, referred to as the current object file, and one memory file, referred
to as the current memory file. Either of these files can be the NULL file, specified by the
- argument,
which is a file with no contents. The object file and the memory file are specified using the following argu-
ments:
kernelfile An HP-UX kernel, usually
vmunix.
memfile /dev/mem or /dev/kmem . memfile is assumed to be on an HP-UX system running
kernelfile if kernelfile is specified.
/dev/mem is supported only on PA-RISC platforms.
crashdir A directory containing an HP-UX system crash dump, which is assumed to be produced from
kernelfile if kernelfile is specified.
objfile Normally an executable program file. It can also be a relocatable object file, shared library file
or a DLKM module. The default for objfile is a.out.
corefile A core image file produced after executing objfile. The default for corefile is
core.
execfile The executable file corresponding to pid, the process ID of the process to be adopted for debug-
ging by
adb.
The current object file may be any one of kernelfile, the vmunix
file in crashdir, objfile,orexecfile. The
current object file preferably should contain a symbol table; if it does not, the symbolic features of
adb can-
not be used, although the file can still be examined. The current memory file may be any one of memfile,
the system memory dump in crashdir, corefile, or the memory of process pid.
Requests to
adb are read from standard input and adb responds on standard output. If the
-w flag is
present, objfile is created (if necessary) and opened for reading and writing, to be modified using
adb. adb
ignores QUIT; INTERRUPT causes return to the next adb command.
There are two modes of operation for adb: backward compatibility mode and normal mode. Backward
compatibility mode is the default on PA-RISC systems. Normal mode is the default on Itanium systems.
On startup
adb executes adb commands from the file $HOME/.adbrc .
To debug a MxN process or the core, adb requires the MxN debug library, libmxndbg. Depending on
the application type, it loads /usr/lib/libmxndbg.sl (for 32 bit PA-RISC systems) or
/usr/lib/libmxndbg64.sl (for 64 bit PA-RISC systems) or
/usr/lib/hpux32/libmxndbg.so (for Itanium(R)-based systems). If the relevant library is not
found in the specified path, you should set the shell variable
ADB_PATHMXNDBG to the path where the
correct library can be found.
Options
adb recognizes the following command-line options, which can appear in any order but must appear before
any file arguments:
-h Print a usage summary and exit. If this option is used, all other options and arguments are
ignored.
-i Ignores $HOME/.adbrc .
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 29