adb(1)

adb(1)

NAME

adb, adb64 - absolute debugger

SYNOPSIS

adb [-w] [-Idir] [-k] [-m] [-Ppid] obj®l [cor®l]

adb64 [-w] [-Idir] [-k] [-m] [-Ppid] obj®l [cor®l]

DESCRIPTION

The adb command executes a general-purpose debugging program that is sensitive to the underlying architecture of the processor and operating system on which it runs. It can be used to examine ®les and provide a controlled environment for executing HP-UX programs.

adb calls adb64 to process 64 bit ®les.

obj®l is normally an executable program ®le, or an HP-UX kernel (vmunix), preferably containing a symbol table; if not, the symbolic features of adb cannot be used, although the ®le can still be examined. The default for obj®l is a.out.

cor®l is assumed to be a core image ®le produced after executing obj®l or an HP-UX crash ®le produced from the obj®l. The default for cor®l is core.

Requests to adb are read from standard input and adb responds on standard output. If the -w¯ag is present, obj®l is created (if necessary) and opened for reading and writing, to be modi®ed using adb. The -Ioption speci®es a directory where ®les read with $< or $<< (see below) are sought; the default is /usr/lib/adb . adb ignores QUIT; INTERRUPT causes return to the next adb command.

The following options are also supported:

-kAllows adb to read obj®l as an HP-UX kernel ®le and cor®l as an HP-UX crash dump. This also allows virtual-to-physical address translation, useful for kernel debugging. In this case, cor®l should be an HP-UX crash dump or /dev/mem. Without -kor -m, adb treats obj®l as an application program ®le and cor®l as an application core ®le.

When adb is invoked with this option, it sets up the context of the currently running process using space registers four through seven. A user speci®ed address is dereferenced by combining it with the appropriate space register, depending on the quadrant in which the 32-bit address lies.

When the current radix is not (decimal) ten, the -koption allows adb to support the notion of long pointers or addresses in the form space.offset. Once a space is speci®ed, all subsequent addresses are dereferenced using that space until the user enters another long address. If a space equal to (hexadecimal) 0xffffffff is used, adb reverts to the previous context and uses space registers four through seven to dereference 32-bit addresses.

-mMust be speci®ed instead of -kwhen a core dump is written to multiple ®les.

When -mis used, cor®l must be speci®ed as the path name of the directory that contains system core dump ®les. A command line using -mmight look similar to the following:

adb -m /var/adm/crash/core.1/vmunix /var/adm/crash/core.1

Notice that when -mis speci®ed on the command line, -kis not necessary.

-PpidCauses adb to adopt process pid as a "traced" process (see ptrace(2)). This option is helpful for debugging processes that were not originally run under the control of adb.

Requests to adb follow the form:

[address] [, count] [command] [;]

If address is present, dot is set to address. Initially dot is set to 0. For most commands, count speci®es the number of times the command is to be executed. The default count is 1. address and count are expres- sions.

The interpretation of an address depends on the context in which it is used. If a subprocess is being debugged, addresses are interpreted in the address space of the subprocess. (For further details of address mapping see Addresses below.)

a

HP-UX Release 11i: December 2000

− 1 −

Section 13