[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1

adb Command

Purpose

Provides a general purpose debug program.

Syntax

adb [ -k ] [ -l Directory ] [ -w ] [ ObjectFile [ CoreFile ] ]

Description

The adb command provides a debug program for programs. With this debug program, you can examine object and core files and provide a controlled environment for running a program.

Normally, the ObjectFile parameter is an executable program file that contains a symbol table. If the ObjectFile parameter does not contain a symbol table, the symbolic features of the adb command cannot be used, although the file can still be examined. The default for the ObjectFile parameter is a.out.

The CoreFile parameter is a core image file produced by running the ObjectFile parameter. The default for the CoreFile parameter is core.

While the adb command is running, it takes standard input and writes to standard output. The adb command does not recognize the Quit or Interrupt keys. If these keys are used, the adb command waits for a new command.

In general, requests to the adb command are in the following form:

[Address] [,Count] [Command] [;]

where Address and Count are expressions. The default for the Count expression is a value of 1. If the Address expression is specified, the . (period) variable is set to Address.

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 usual way in the address space of the subprocess.

Enter more than one command at a time by separating the commands with a ; (semicolon).

The adb debug program allows the use of various:

See the adb Debug Program Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs for detailed information.

Note: If the object file does not contain the symbol table, the adb command will not be able to show the value of static, automatic, and external variables of a program.

Flags

-k Causes kernel mapping.
-l Directory Specifies a directory where files to be read with $< or $<< are sought. The default is the /usr/ccs/bin/adb file.
-w Opens the ObjectFile and the Corefile parameters for reading and writing. If either file does not exist, this flag creates the file.

Return Values

The adb debug program is printed when there is no current command or format. The adb command indicates such things as inaccessible files, syntax errors, and abnormal termination of commands. Exit status is a value of 0, unless the last command was unsuccessful or returned non-zero status.

Files

/dev/mem Provides privileged virtual memory read and write access.
a.out Provides common assembler and link editor output.
core Contains an image of a process at the time of an error.

Related Information

The cc command, dbx command.

adb Debug Program Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]