Contents|Index|Previous|Next
Choosing
modes
You can run GDB in various
alternative modes—for example, in batch mode or quiet mode.
-nx
-n
Do not execute commands
from any initialization files (normally called ‘.gdbinit’).
Normally, the commands in these files are executed after all the command
options and arguments have been processed. See Command
files.
-quiet
-q
Quiet. Do not print
the introductory and copyright messages. These messages are also suppressed
in batch mode.
-batch
Run in batch mode. Exit
with status 0
after processing all the command files specified with ‘-x’
(and all commands from initialization files, if not inhibited with ‘-n’).
Exit with nonzero status if an error occurs in executing the GDB commands
in the command files.
Batch mode may be useful
for running GDB as a filter, for example to download and run a program
on another computer; in order to make this more useful, the following message
does not issue when running in batch mode (ordinarily, the message issues
whenever a program running under GDB control terminates).
-cd directory
Run GDB using directory
as its working directory, instead of the current directory.
-fullname
-f
GNU Emacs sets this option
when it runs GDB as a subprocess. It tells GDB to output the full file
name and line number in a standard, recognizable fashion each time a stack
frame is displayed (which includes each time your program stops). This
recognizable format looks like two ‘\032’
characters, followed by the file name, line number and character position
separated by colons, and a newline. The Emacs-to-GDB interface program
uses the two ‘\032’
characters as a signal to display the source code for the frame.
-b bps
Set the line speed (baud
rate or bits per second) of any serial interface used by GDB for remote
debugging.
-tty
device
Run using device
for your program’s standard input and output.