Starting the Debugger from a Command Line

When you invoke the debugger from a command line you can bring a program or core file under debugger control, or you can attach to a running process.

The following is the command line syntax to invoke the debugger using the idb command:

idb [gdb_options ] [ executable_file  [ core_file ] ]

Note that the set of recognized options depends on the mode. For example, -V option is valid in DBX mode, but not in GDB mode.

gdb_options:

: -args file

| -batch

| -cd dir

 |   -clomp launcher launcher_args

| -command file

| -c[ore] file

| -dbx

| -d[irectory] dir

| -e[xec] file

| -f[ullname]

| -gdb [ gdb_options ]

| -help

| -interpreter name

| -n[x]

| -nowindows

| -nw

| -p[id] pid

 |   -parallel launcher launcher_args

 |   -parallelattach launcher

| -q[uiet]

| -silent

| -tty device

| -version

| -ui name

| -x file

dbx_options:

[ -args file ]

[ -batch ]

[ -c file ]

[ -cd directory ]

[ -clomp launcher launcher_args ]

[ -command file ]

[ -core file ]

[ -dbx ]

[ -echo ]

[ -emacs ]

[ -fullname ]

[ -gdb [ gdb_options ] ]

[ -gui ]

[ -help ]

[ - i file ]

[ -I dir ]

[ -interactive ]

 [  -interpreter mode]

[ -maxruntime minutes ]

[ -nosharedobjs ]

[ -parallel launcher launcher_args ]

[ -parallelattach launcher ]

[ -p[id] process_id ]

[ -prompt string ]

[ -quiet ]

[ -remote [[protocol:]address:]port ]

[ -tty terminal_device ]

[ -V ]

[ -version ]

DBX mode refers to the debugger's command input mode that is "dbx like" in its command syntax. It is not fully dbx compatible.

Note:

Options can be prefixed by a dash (-) or double dash (--). Option names may be abbreviated as long as the abbreviations are unambiguous. An option and its argument are separated with one or more spaces or equal sign (=).

For example, to invoke the debugger on an executable file named a.out:

% idb a.out

To invoke the Debugger on a core file:

% idb a.out core

To invoke the debugger and attach to a running process when you do not know what file it is executing:

% idb -pid 8492