You are on page 1of 12

adb(1)

adb(1)

NAME adb - absolute debugger SYNOPSIS adb [-h]

adb [-n-o] [-w] [-I path ] kernelle memle adb [-n-o] [-w] [-I path ] kernelle crashdir adb [-n-o] [-w] [-I path ] crashdir adb [-n-o] [-w] [-I path ] [objle ] [corele ] adb [-n-o] [-w] [-I path ] -P pid [execle ]
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 is run It can be used to examine les and provide a controlled environment for executing HP-UX programs.

adb inspects exactly one object le, referred to as the current object le , and one memory le, referred to as the current memory le . Either of these les can be the NULL le, specied by the - argument,
which is a le with no contents. The object le and the memory le are specied using the following arguments: kernelfile memfile crashdir objfile corefile execfile An HP-UX kernel, usually vmunix.

/dev/mem or /dev/kmem. memle is assumed to be on an HP-UX system running kernelle if kernelle is specied. /dev/mem is supported only on PA-RISC platforms.
A directory containing an HP-UX system crash dump, which is assumed to be produced from kernelle if kernelle is specied. Normally an executable program le. It can also be a relocatable object le, shared library le or a DLKM module. The default for objle is a.out. A core image le produced after executing objle . The default for corele is core. The executable le corresponding to pid , the process ID of the process to be adopted for debugging by adb.

The current object le may be any one of kernelle , the vmunix le in crashdir , objle , or execle . The current object le preferably should contain a symbol table; if it does not, the symbolic features of adb cannot be used, although the le can still be examined. The current memory le may be any one of memle , the system memory dump in crashdir , corele , or the memory of process pid . Requests to adb are read from standard input and adb responds on standard output. If the -w ag is present, objle is created (if necessary) and opened for reading and writing, to be modied 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 le $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 specied 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 le arguments:

-h -i

Print a usage summary and exit. If this option is used, all other options and arguments are ignored. Ignores $HOME/.adbrc.

-I path path species a list of directories where les read with < or << (see below) are sought. This list has the same syntax as, and similar semantics to, the PATH shell variable; the default is
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

adb(1)

adb(1)

.:/usr/lib/adb. -n -o -P pid
Specify the normal mode. This is the default on Itanium systems. This option is mutually exclusive with the -o option. The last one specied takes effect. Specify backward compatibility mode. This is the default on PA-RISC systems. This option is mutually exclusive with the -n option. The last one specied takes effect. Adopt process with process ID pid as a traced process; see ttrace (2). This option is helpful for debugging processes that were not originally run under the control of adb. This option must be specied to enable the le write commands of adb. Objle is opened for reading and writing. It also enables writes to memle if it is a kernel memory le.

-w

The following command-line options to adb are obsolete and are no longer required. (If used they generate a warning.)

-k -m

Previously adb required this option to recognize HP-UX crash dumps or /dev/mem. Previously adb required this option to recognize multiple le HP-UX crash dumps.

Requests to adb follow either the traditional form: [address ] [ ,count ] [command-char ] [command-arguments ] [;] or the new form: keyword [command-arguments ] [;] Only the traditional form is available in backward compatibility mode. If address is present, dot is set to address . dot is the adb state variable which keeps track of the current address. dotincr is another state variable which keeps track of increments to dot as adb steps through a format string; see Format String below. Initially dot and dotincr are set to 0. For most commands, count species the number of times the command is to be executed. The default count is 1. address and count are expressions. 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 see Address Mapping below.) The command-char and command-arguments specify the command to run. See Commands below. Expressions All adb expression primaries are treated as 64-bit unsigned integers and the expression also evaluates to a 64-bit unsigned integer. The following primaries are supported: integer A number. The prexes 0 (zero), 0o and 0O force interpretation in octal radix; the prexes 0t, OT, 0d, and 0D force interpretation in decimal radix; the prexes 0x and 0X force interpretation in hexadecimal radix; the prexes 0b and 0B force interpretation in binary radix. Thus 020 = 0d16 = 0x10 = 0b1000 = sixteen. If no prex appears, the default radix is used; see the d command. The radix is initialized to hexadecimal. Note that a hexadecimal number whose most signicant digit would otherwise be an alphabetic character must have a 0x (or 0X) prex.

cccccccc The ASCII value of up to 8 characters. If more than 8 characters are specied, the value is undened. A backslash (\) can be used to escape a single quote (). $register
Register. The value of the register is obtained from the register set corresponding to the current memory le. Register names are implementation dependent; see the r command. A symbol is a sequence of uppercase or lowercase letters, underscores, or digits, not starting with a digit. A backslash (\) can be used to escape other characters. The value of the symbol is taken from the symbol table in the current object le. A variable name consists of alphabets and numerals and always starts with $. Names of registers in the target processor are reserved as variable names and can be used to access registers in expressions. In backward compatibility mode, a variable is a single numeral or alphabet except for registers and the prex letter is >.

symbol

variable

Hewlett-Packard Company

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

Here is a list of variables supported in both modes.

9 b d t e s m

The count on the last $< command. The base address of the data segment. The data segment size. The text segment size. The entry point. The stack segment size. The magic number as dened in <magic.h>

On entry, b , d , and t are set from the headers in the current memory le. If the current memory le does not appear to be valid these values are set from the current object le. e is set from the current object le. Note: These are set only from core les and object les. The following primaries are supported only in the normal mode:

$. $+ $$ . + ^
"

The value of dot. The value of dot increased by the value of dotincr. The value of dot decreased by the value of dotincr. The last address typed.

The following primaries are supported only in backward compatibility mode: The value of dot. The value of dot increased by the value of dotincr. The value of dot decreased by the value of dotincr. The last address typed.

The following C arithmetic, relational and logical operators are supported and have the same precedence as in C:

?: || && | & == != < > <= >= >> << + - * / % !


The C unary sign operators + and - and the () operator are also supported. In addition to the above operators the following adb specic unary operators are supported and have the same precedence as the other unary operators:

*exp
@exp

The contents of the location addressed by exp in the current memory le. The contents of the location addressed by exp in the current object le.

The following adb specic binary operator has the same precedence as the % operator: exp1 #exp2 exp1 rounded up to the next multiple of exp2 .

In backward compatibility mode, the % operator has the same semantics as the / operator. The unary + operator is not available in this mode. Sub-expressions containing any of the following operators should be protected by () if used in address or count expressions:

?: / $ !
In addition to the above, in backward compatibility mode the > operator also should be protected. Commands As mentioned above, adb commands may be specied in the traditional form or the keyword form. In backward compatibility mode, only the traditional form is supported. Traditional Form Commands The following categories of commands are specied in the traditional command form: File commands 3 Hewlett-Packard Company 3

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

Keyword commands Process commands Thread commands Shell commands

In backward compatibility mode: Variable commands

File commands These commands operate on the current object le or the current memory le and are used to read, write, etc. le_selector [ modier ] [ ,size | index ] [arglist ] The le_selector can be one of these:

? / =
(no modifier)

The selected le is the current object le. The selected le is the current memory le. This special symbol is only used for printing the value of dot.

The modier species the operation on the le; modier can be: It takes a single optional argument list which is a format string. adb prints data from the selected le according to the format string. If a format string is not present and the le selector is ? or / then adb uses the format string used by either of these earlier. If the le selector is = and a format string is not present, then adb uses the format string used by the previous = command. / [ , size ] value [ mask ] Search the selected le. Words of size, size starting at dot are masked with mask and compared with value until a match is found. If found, dot is set to that address of masked object. If mask is omitted, no mask is used. dotincr is set to 0. Valid values of size are 1, 2, 4, 8. If no size is specied then sizeof(int) is assumed. value and mask are unsigned integers of size size bytes. For example: expr ?/,4 6 5. Search for 4 byte value, 4 ( 6 & 5 ) in the current object le, starting at expr . = [ , size ] value1 value2 ... Write a size sized value at the addressed location. dot is incremented by size after each write. dotincr is set to 0. Values of size and values are same as for / modier. For this operation, the le should be opened with -w option. For example: expr ?=,4 6 5. Write 6 & 5 in the current object le at addresses expr and expr +4 respectively, starting at expr . > [ , index ] b e f Set the index th mapping triple parameters of the selected le to the corresponding argument values in order. Refer to Address Maps . If fewer than three arguments are given, remaining maps remain unchanged. The arguments are expressions. If not specied, index is assumed to be 0. For example: ?>,0 1 2 3 Set b , e , f (index 0) of the current object le to 1, 2, 3 respectively. In backward compatibility mode the following modiers are also present.

* l L w W

It has same behavior as that when no modier is present. However, it uses the second mapping triple to locate the le address of data to be printed. It has same behavior as modier / with an implicit size of 2. It sets dotincr to 2. It has same behavior as modier / with an implicit size of 4. It sets dotincr to 4. It has same behavior as modier = with an implicit size of 2. It sets dotincr to 2. It increments dot by the total size of all the values written minus dotincr. It has same behavior as modier / with an implicit size of 4. It sets dotincr to 4. dot is set as for w.

Hewlett-Packard Company

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

m *m

It has same behavior as modier > with an implicit index of 0. It has same behavior as modier > with an implicit index of 1.

For these modiers, no explicit size or index can be mentioned. These modiers are deprecated. Keyword Commands Run the Keyword Command Form using the traditional command form by prexing the command with $. Please refer to Keyword Form Commands for the complete list of keyword commands. Process Commands These commands deal with managing subprocesses. adb can run an object le as a subprocess. Also, it can adopt a subprocess given its pid. adb can debug multi-threaded and/or forked subprocesses. It can also debug multiple subprocesses at the same time. However, at any time it focuses on a one subprocess and one of its threads called the current subprocess and current thread respectively. The command consists of : followed by the modier and an optional list of arguments. They are: r [ objfile ] Run objle as a subprocess. If address is given explicitly, the program is entered at this point; otherwise the program is entered at its standard entry point. The value count species how many breakpoints are ignored before stopping. arguments to the subprocess may be supplied on the same line as the command. Semicolon is not used as a command separator. An argument starting with < or > causes the standard input or output to be established for the command. All signals are turned on when entering the subprocess. Such a subprocess is referred to as a created subprocess . If there are other created subprocesses running, all are killed. It does not kill any attached subprocesses. This becomes the current subprocess. e [ objfile ] a [ objfile ] Set up a subprocess as in :r; no instructions are executed. Causes adb to adopt process with pid as a traced subprocess. If the objle is specied, adb uses it to lookup symbol information. Count has same meaning as in :r. Such a subprocess is referred to as an attached subprocess . This subprocess becomes the current subprocess. k [ pid | * ] Kills a created subprocess. If no argument is specied it kills the current subprocess. If a pid is given, it kills the subprocess with that pid . If * is given, it kills all created subprocesses. The current subprocess is chosen from the remaining subprocesses. de [ pid | * ] The arguments can be a pid or a *. Same as :k, however it applies to attached subprocesses. adb detaches from them. c [ signal ] Continues the current subprocess with signal signal . It continues all the threads of the subprocess. If no signal is specied, the signal that caused it to stop is sent. If address is specied, the current thread continues at this address. Breakpoint skipping is the same as for :r.

s [ signal | arg1 arg2 ... ] Step the current thread count times. If address is given, then the thread continues at that address , else from the address where it had stopped. If no signal is specied, the signal that caused it to stop is sent. If there is no current subprocess, object le is run as a subprocess as for :r. In this case no signal can be sent; the remainder of the line is treated as arguments to the subprocess. b [ command ] Sets breakpoint at address in the current subprocess The breakpoint is executed count -1 times before causing a stop. Each time the breakpoint is encountered, the command is executed. This breakpoint is a subprocess breakpoint. If any of the thread executes the instruction at this address , it will stop. Multiple breakpoints can be set at the same address . d [ num | * ] Deletes all breakpoints at address in the current subprocess, if it is specied. If * is specied, it deletes all the current subprocess breakpoints. If num is specied, breakpoint with number num is deleted. HP-UX 11i Version 3: September 2010 5 Hewlett-Packard Company 5

adb(1)

adb(1)

en [ num | * ] Enables all breakpoints at address in the current subprocess, if it is specied. If * is specied, it enables all the current subprocess breakpoints. If num is specied, breakpoint with number num is enabled. di [ num | * ] Disables all breakpoints at address in the current subprocess, if it is specied. If * is specied, it disables all the current subprocess breakpoints. If num is specied, breakpoint with number num is disabled.

z signum [ +s | -s | +r | -r | +d | -d ] Changes signal handling for a specied signum for all the threads of the current subprocess. Disposition can be specied as:

+s -s +r -r +d -d
w [ pid ]

Stop subprocess when signum is received. Do not stop subprocess when signum is received. Report when signum is received. Do not report when signum is received. Deliver signum to the target subprocess . Do not deliver signal to the target subprocess .

Switches from the current subprocess to the subprocess with process ID pid . This process becomes the current subprocess. This subprocess must be an already attached or created subprocess. Both subprocesses are in stopped state after this command. Same as w however the previous current subprocess is not stopped.

wc [ pid ]

Thread Commands These commands manage the threads in the current subprocess. The command consists of a ] followed by a modier and an optional argument list. s [ signum ] c [ signum ] Same as :s. However it is strictly for the current thread only. Same as :c. However it continues only the current thread. And count refers to the breakpoint to skip for the current thread.

b [ command ] Same as :b. However it applies to the current thread only. d [ num | * ] Same as :d. However it applies to current thread only.

en [ num | * ] Same as :en. However it applies to the current thread only. di [ num | * ] Same as :di. However it applies to the current thread only. z signum [ +s | -s | +r | -r | +d | -d ] Same as :z. However it is meant for the current thread only. If a signum occurs in the context of this thread this disposition value is used instead of that of the subprocess. es [ signum ] Sets the ag for this signum for the current thread. It means that if this signal signum occurs in the context of this threads signal disposition value is used instead of that of the subprocess. Switch from the current thread to some other thread. Both the threads are in stopped state after this, and the thread with threadid becomes the current thread. This command is also applicable to core le debugging. It switches from present thread to given thread and makes the given thread as the current thread.

w [ pid ]

Shell Commands This action consists of a ! character followed by a string . The string is passed unchanged to the shell dened by the SHELL environment variable or to /bin/sh. Variable Commands This is supported in backward compatibility mode only. It consists of a > followed by a variable , var and an optional value . This action assigns value to the variable or register named by var . If not specied, value is assumed to be the value of dot. This behavior is deprecated.

Hewlett-Packard Company

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

Keyword Form Commands All commands in this form consist of a keyword followed by a variable number of arguments. In backward compatibility mode, a $ must precede these keyword form commands. < filename Reads commands from lename . If this command is executed in a le, further commands in the le are not seen. In backward compatibility mode, if a count is given, it is placed in variable 9 before the rst command in the le is executed. This behavior is deprecated. << filename Similar to < except it can be used in a le of commands without causing the le to be closed. In backward compatibility mode, variable 9 is saved when the command executes and is restored when it completes. This behavior is deprecated. > filename It sends output to lename , which is created if it does not already exist. In backward compatibility mode, the output is appended to lename . >> filename Similar to > except that the output is appended to lename .

rp r ra f fd b ps pc

Print the process ID and register values. Print the general registers and the instruction addressed by the process counter. Print all the registers. Print the oating-point registers. Print the double precision oating-point registers. Print all breakpoints, their number, associated counts, state and commands of the current subprocess. Print information about all the subprocesses being traced by adb that is, their process IDs, their types (created or attached), counts, and threadids. Print information about the current debuggee. If the current debuggee is a subprocess, then it prints subprocess information (process ID, type, count) and prints information about each thread (thread ID, count, signal) of the subprocess. If the current debuggee is a core then it prints information about each thread present in the core (thread no, utid, lwpid, PC value and PC Symbol). Print information about the current thread (thread ID, count, signal). If the current debuggee is a core then it prints information about the current thread of the core. (utid, lwpid and register information). The arguments can be address and count . Print C stack backtrace. If address is given, it is taken as the address of the current frame (instead of the normal stack frame pointer). If count is given, only the rst count frames are printed. In backward compatibility mode, this command has a non-standard deprecated behavior. If arguments are not mentioned, it uses address and count .

pt

w [ width ]

Set the page width for output to width . (The default is 80.) In backward compatibility mode, this command has a non-standard deprecated behavior. If width is not mentioned, address is taken as width.

s [ offset ]

Set maxoffset to offset . In backward compatibility mode, this command has a non-standard deprecated behavior. If offset is not mentioned, address is taken as offset.

o
d [ radix ]

The default radix for all integers input is set to octal. Set the default radix to radix . In backward compatibility mode, this command has a non-standard deprecated behavior. If radix is not mentioned, address is taken as radix.

x q

The default radix for all integers input is set to hexadecimal. Quit adb. 7 Hewlett-Packard Company 7

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

v m z zt k

Print the value of all variables. Print the address map. This includes both the initial and default maps for a valid corele with an indication of which is currently active. Print a list of signals and how they are handled for the current subprocess. Print a list of signals, their associated ags, and how they are handled for the current thread. Print all DLKM modules or shared libraries. With a

n [ nodenumber ] Without arguments print node information on a CCNUMA machine. nodenumber argument, change to that node.

p traditional_cmd This keyword command takes a traditional command as argument and interprets it. a var value Assign value to adb variable var . pa Virtual_Offset Prints the physical address for a given Virtual Offset in HEX format. Space ID is taken from the adb variable space. You can set the adb variable space using the keyword command a explained earlier. The following commands can run only in backward compatibility mode. newline Print the process ID and register values. Toggle the address mapping of memle between the initial map set up or a valid memory le and the default mapping pair which the user can modify with the le action modier >. If the memory le was invalid, only the default mapping is available.

N [ nodenumber ] Print the number of nodes on V-class multinode machines and the current node number. To switch to another node, enter $N nodenumber.

F R U

Print double precision oating point registers. Print all registers. Print unwind tables.

Format String A format string is used to specify the formatting to be done before data is printed by adb. There are two types of format strings supported by adb: traditional style and printf style . A traditional style format string is a sequence of format speciers . A printf-style format string is always preceded by a comma (,) and enclosed within double quotes (""), and is a sequence of format speciers and other characters. Each format specier should be preceded by a % character. Characters other than format speciers are printed as is. If needed, % should be escaped by %. It supports C language style \ character escape sequences. While processing a format string, adb scans the format string from left to right and applies each conversion specier encountered to the object addressed by the sum of dot and dotincr. After each conversion specier is processed, dotincr is incremented by count times size (implicit or explicit) of that conversion specier. If the format string is used to print the value of dot (using action =), dot and dotincr remain unchanged. For dotincr operator, dotincr is updated appropriately. In backward compatibility mode, only the traditional style format string is supported. Format Specier A format specier can be a conversion specier or a dot operator . 1. Conversion Specier Each conversion specier consists of an optional count or pspec followed by an optional size specier character , followed by a conversion specier character . count This is available only for the traditional style format string. The count species the number of times this conversion specier is to be repeated. If not specied, count is assumed to be 1. 8 Hewlett-Packard Company 8 HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

pspec This is available only for the printf-style format string. It is a sequence of ags, eldwidth and precision as in the printf (3S) library function. size specifier character This species the size of object to which this is applied. Size can be specied in two ways. One is using absolute size specier and other is relative size specier. Absolute size speciers are as follows.

b e g j k w h l n m

The size of the object is 1 byte. The size of the object is 2 bytes. The size of the object is 4 bytes. The size of the object is 8 bytes. The size of the object is 16 bytes.

Relative size speciers are as follows The size of the object is the size of a machine word of the target processor. The size of the object is half the size of a machine word of the target processor. The size of the object is double the size of a machine word of the target processor. The size of the object is the size of a pointer on the target processor. This will be different for wide les and narrow les. The size of the object is the size of an instruction of the target processor. This will be supported only on processors where this is constant.

Conversion Specifier Character The following characters are supported

a c o d u i f p s y

The value of dot is printed in symbolic form. The object is printed as a character. The object is printed as an unsigned octal number. The object is printed as a signed decimal number. The object is printed as an unsigned decimal number. The object is disassembled as an instruction and printed. The object is printed in a oating point format according to its size. The object is printed in symbolic form. The object is assumed to be a null terminated string and printed. This cannot be used to print dot. The object is cast to type time_t and printed in the ctime (3C) format.

Here the printf-style format strings support only c, o, d, u, x, f, and s. If the size specier character is not specied, it is assumed to be b for conversion character c; w for conversion characters d, u, x, o, and f; m for i; sizeof(time_t) for y; and w for everything else. For example.

10=2bo, abc=,"%s", main?4i

2. Dot Operator A dot operator consists of an optional count , optional size specier character , and a dot operator character . count count species the number of times this dot operator is to be repeated. If not specied, count is assumed to be 1. The count is always 1 for printf-style format strings. Size Specifier Character Same as size specier character of conversion specier. Dot operator character This can be one of these

Increment dotincr by count times size. 9 Hewlett-Packard Company 9

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

Decrement dotincr by count times size.

For example:

=5bv, =5bv5bz

Backward Compatibility Mode In backward compatibility mode, the traditional style can be a conversion specier , dot operator , spacing specier , or a literal string . 1. Conversion Specier

A conversion specier consists of an optional count followed by a conversion specier character . count Specify the number of times this conversion specier is to be repeated. If not specied, count is assumed to be 1. Conversion Specifier Character These have an implicit size. No explicit size is recognized. The following format characters are available: (Their implicit sizes are mentioned next to them.)

o 2 O 4 q 2 Q 4 d 2 D 4 x 2 X 4 A 8 u 2 U 4 f 4 F 8 b 1 B 1 c 1 C 1

The object is printed as an unsigned octal number. The object is printed as an unsigned octal number. The object is printed as a signed octal number. The object is printed as a signed octal number. The object is printed as a signed decimal number. The object is printed as a signed decimal number. The object is printed as a unsigned hexadecimal number. The object is printed as a unsigned hexadecimal number. The object is printed as a unsigned hexadecimal number. The object is printed as a unsigned decimal number. The object is printed as a unsigned decimal number. The object is printed as a oating point number. The object is printed as a double precision oating point number. The object is printed as a hexadecimal number. The object is printed as an octal number. The object is printed as a character (the sign bit is ignored). The object is printed as a character using the following escape convention. First, the sign bit is discarded, then character values 000 to 040 are printed as @ followed by the corresponding character in the range 0100 to 0140. The character @ is represented as @@. The object is assumed to be a sequence of bytes terminated with a n as an instruction and printed. The value of n is the number of bytes occupied by the instruction. This cannot be used to print dot. The object is assumed to be a sequence of bytes terminated with a null byte. These bytes of the object are printed as a sequence of characters using the @ escape convention. The value of n is the number of bytes in the object including the null byte. This cannot be used to print dot. The object is printed in the date format (see ctime (3C)). The object is disassembled as an instruction and printed. The value of n is the number of bytes occupied by the instruction. The value of dot is printed in symbolic form. The object is printed in symbolic form. The value of n s machine-dependent.

s n

S n

Y 4 i n a 0 p n
For example: 2. Dot Operator 10

main=ba, a=c, main?10box

Hewlett-Packard Company

10

HP-UX 11i Version 3: September 2010

adb(1)

adb(1)

A dot operator consists of an optional count followed by a dot operator character. count Same as that of count of conversion specier. Dot operator character A dot operator character is one of these:

^ + For example:

dotincr is decreased by count times size corresponding to the previous conversion specier character. dotincr is increased by count. dotincr is decreased by count. 10=-, 10=2-, 10=5o4

3. Spacing specier A spacing specier consists of an optional count or an optional tabstop followed by a spacing specier character . count Same as that of count of conversion specier. tabstop Same as that of count of conversion specier. However, it is used only with the t spacing specier. If no value is mentioned, it is assumed to be 1. spacing specifier character A spacing specier character can be one of these:

t r n
For example:

Move to the next tab stop appropriate for tabstop. For example, 8t moves to the next 8-space tab stop. Print a space. Print a newline character.

10=2o2t2o, 10=2o2r2o, 10=2o2n2o

4. Literal String A literal string is any number of characters enclosed within double quotes (""). For example:

10="in octal "ot"in hex "x

Address Maps In les like object les and application core les, the virtual memory address is the not the same as the le offset. So adb keeps an array of address maps for these les to map a given virtual memory address to a le offset. Each address map is a triple: start virtual address (b ), end virtual address (e ) and start le offset (f ). The triple species that all addresses from b to e - 1 occupy a contiguous region in the le starting at f . Given a virtual address a such that b a < e , the le offset of a can be computed as f + a - b . State variables There are several variables which dene the state of adb at any instant in time. They are:

dot dotincr prompt radix maxwidth maxoffset macropath pager

Current address. Initial value is 0. Current address increment. Initial value is 0. Prompt string used by adb. Initial value is adb> . The current input radix. Initial value is as in the assembly language of the target processor. The maximum width of the display. Initial value is 80. If an address is within this limit from a known symbol, adb prints the address as symbol_name +offset , else the address is printed. Initial value is 0xffffffff. List of directories to be searched for adb macros. Initial value is .:/usr/lib/adb. Pager command used by adb. Initial value is more -c. cessor.

backcompat Set to 1 if adb is in backward compatibility mode. Initial value depends on the host pro-

HP-UX 11i Version 3: September 2010

11

Hewlett-Packard Company

11

adb(1)

adb(1)

Note

adb64 is a symbolic link to adb. This symbolic link is maintained for backward compatibility with some old scripts which may be using adb64.
EXTERNAL INFLUENCES International Code Set Support Single- and multi-byte character code sets are supported. RETURN VALUE adb comments about inaccessible les, syntax errors, abnormal termination of commands, etc. Exit status is 0 unless the last command failed or returned non-zero status. AUTHOR adb was developed by HP. FILES

a.out core /dev/mem /dev/kmem


SEE ALSO ttrace(2), crt0(3), ctime(3C), end(3C), a.out(4), core(4), signal(5). ADB Tutorial

12

Hewlett-Packard Company

12

HP-UX 11i Version 3: September 2010

You might also like