HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

a
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 file or the current memory file and are used to read, write,
etc.
file_selector [ modifier][
,size | index][arglist ]
The file_selector can be one of these:
? The selected file is the current object file.
/ The selected file is the current memory file.
= This special symbol is only used for printing the value of
dot.
The modifier specifies the operation on the file; modifier can be:
(no modifier)
It takes a single optional argument list which is a format string.
adb prints data from
the selected file according to the format string. If a format string is not present and the
file selector is ? or / then adb uses the format string used by either of these earlier.
If the file 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 file. 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 specified 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
file, 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 /
modifier. For this operation, the file should be opened with
-w
option.
For example:
expr?=,4 6 5. Write 6 & 5 in the current object file at addresses expr
and expr+4 respectively, starting at expr.
> [ , index ] bef
Set the index
th
mapping triple parameters of the selected file 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
specified, index is assumed to be 0. For example: ?>,0123Set b, e, f (index 0)
of the current object file to 1, 2, 3 respectively.
In backward compatibility mode the following modifiers are also present.
* It has same behavior as that when no modifier is present. However, it uses the second
mapping triple to locate the file address of data to be printed.
l It has same behavior as modifier / with an implicit size of 2. It sets dotincr to 2.
L It has same behavior as modifier / with an implicit size of 4. It sets dotincr to 4.
w It has same behavior as modifier = 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.
W It has same behavior as modifier / with an implicit size of 4. It sets dotincr to 4.
dot is set as for w.
Section 1−−6 Hewlett-Packard Company − 4 − HP-UX 11i Version 2: September 2004