manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.2 Choosing Modes

You can run No value for GDBN in various alternative modes—for example, in batch mode or quiet mode.

-nx
-n

Do not execute commands found in any initialization files. Normally, No value for GDBN executes the commands in these files after all the command options and arguments have been processed. See section Command Files.

-quiet
-silent
-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 No value for GDBN commands in the command files.

Batch mode may be useful for running No value for GDBN as a filter, for example to download and run a program on another computer; in order to make this more useful, the message

 
Program exited normally.

(which is ordinarily issued whenever a program running under No value for GDBN control terminates) is not issued when running in batch mode.

-batch-silent

Run in batch mode exactly like ‘-batch’, but totally silently. All No value for GDBN output to stdout is prevented (stderr is unaffected). This is much quieter than ‘-silent’ and would be useless for an interactive session.

This is particularly useful when using targets that give ‘Loading section’ messages, for example.

Note that targets that give their output via No value for GDBN, as opposed to writing directly to stdout, will also be made silent.

-return-child-result

The return code from No value for GDBN will be the return code from the child process (the process being debugged), with the following exceptions:

  • No value for GDBN exits abnormally. E.g., due to an incorrect argument or an internal error. In this case the exit code is the same as it would have been without ‘-return-child-result’.
  • The user quits with an explicit value. E.g., ‘quit 1’.
  • The child process never runs, or is not allowed to terminate, in which case the exit code will be -1.

This option is useful in conjunction with ‘-batch’ or ‘-batch-silent’, when No value for GDBN is being used as a remote program loader or simulator interface.

-nowindows
-nw

“No windows”. If No value for GDBN comes with a graphical user interface (GUI) built in, then this option tells No value for GDBN to only use the command-line interface. If no GUI is available, this option has no effect.

-windows
-w

If No value for GDBN includes a GUI, then this option requires it to be used if possible.

-cd directory

Run No value for GDBN using directory as its working directory, instead of the current directory.

-fullname
-f

GNU Emacs sets this option when it runs No value for GDBN as a subprocess. It tells No value for GDBN 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-No value for GDBN interface program uses the two ‘\032’ characters as a signal to display the source code for the frame.

-epoch

The Epoch Emacs-No value for GDBN interface sets this option when it runs No value for GDBN as a subprocess. It tells No value for GDBN to modify its print routines so as to allow Epoch to display values of expressions in a separate window.

-annotate level

This option sets the annotation level inside No value for GDBN. Its effect is identical to using ‘set annotate level’ (see section No value for GDBN Annotations). The annotation level controls how much information No value for GDBN prints together with its prompt, values of expressions, source lines, and other types of output. Level 0 is the normal, level 1 is for use when No value for GDBN is run as a subprocess of GNU Emacs, level 3 is the maximum annotation suitable for programs that control No value for GDBN, and level 2 has been deprecated.

The annotation mechanism has largely been superseded by GDB/MI (see section The GDB/MI Interface).

--args

Change interpretation of command line so that arguments following the executable file are passed as command line arguments to the inferior. This option stops option processing.

-baud bps
-b bps

Set the line speed (baud rate or bits per second) of any serial interface used by No value for GDBN for remote debugging.

-l timeout

Set the timeout (in seconds) of any communication used by No value for GDBN for remote debugging.

-tty device
-t device

Run using device for your program's standard input and output.

-tui

Activate the Text User Interface when starting. The Text User Interface manages several text windows on the terminal, showing source, assembly, registers and No value for GDBN command outputs (see section No value for GDBN Text User Interface). Alternatively, the Text User Interface can be enabled by invoking the program ‘No value for GDBTUI’. Do not use this option if you run No value for GDBN from Emacs (see section Using No value for GDBN under GNU Emacs).

-interpreter interp

Use the interpreter interp for interface with the controlling program or device. This option is meant to be set by programs which communicate with No value for GDBN using it as a back end. See section Command Interpreters.

--interpreter=mi’ (or ‘--interpreter=mi2’) causes No value for GDBN to use the GDB/MI interface (see section The GDB/MI Interface) included since No value for GDBN version 6.0. The previous GDB/MI interface, included in No value for GDBN version 5.3 and selected with ‘--interpreter=mi1’, is deprecated. Earlier GDB/MI interfaces are no longer supported.

-write

Open the executable and core files for both reading and writing. This is equivalent to the ‘set write on’ command inside No value for GDBN (see section Patching Programs).

-statistics

This option causes No value for GDBN to print statistics about time and memory usage after it completes each command and returns to the prompt.

-version

This option causes No value for GDBN to print its version number and no-warranty blurb, and exit.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.