up | Inhaltsverzeichniss | Kommentar

Manual page for GDB(1)

gdb - GNU Debugger

SYNOPSIS

gdb [ options ] [ name ] [ core ]

DESCRIPTION

gdb is a source-level symbolic debugger for C programs, created by Richard M. Stallman for the GNU Project and distributed by the Free Software Foundation. gdb has something of the flavor of dbx, but has more features and power.

GDB is invoked with the shell command gdb. Once started, it reads commands from the terminal until you quit by giving the quit command. name is the name of your executable program, and core, if specified, is the name of the core dump file to be examined.

gdb has been substantially modified and extended by NeXT Software, Inc. to support the use of Objective-C and Mach.

OPTIONS

If you need to specify more precisely the files to debugged, you can do so with the following command-line options. All the options and command line arguments given are processed in sequential order. The order makes a difference when the -x command is used.
-s file
Read symbol table from file.
-e file
Use file as the executable file to execute when appropriate, and for examining pure data in conjunction with a core dump.
-se file
Read symbol table from file and use it as the executable file.
-c file
Use file as a core dump file to examine.
-x file
Execute GDB commands from file.
-d directory
Add directory to the path to search for source files.

The following additional command-line options can be used to affect certain aspects of the behavior of gdb:

-nx
Don't execute commands from the init files .gdbinit. Normally, the commands in these files are executed after all the command options and arguments have been processed.
-q
Quiet. Don't print the usual introductory messages.
-batch
Run in batch mode. Exit with code 1 after processing all the command files specified with -x (and .gdbinit, if not inhibited). Exit also if, due to an error, GDB would otherwise attempt to read a command from the terminal.
-fullname
This option is used when Emacs runs GDB as a subprocess. It tells GDB to produce the full file name and line number each time a stack frame is displayed (which includes each time the program stops).

SEE ALSO

cc(1)


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97