Chapter 4. Getting In and Out of gdb
15
-async
Use the asynchronous event loop for the command-line interface. gdb processes all events, such
as user keyboard input, via a special event loop. This allows gdb to accept and process user
commands in parallel with the debugged process being run
1
, so you don’t need to wait for control
to return to gdb before you type the next command. (
Note:
as of version 5.1, the target side of
the asynchronous operation is not yet in place, so
-async
does not work fully yet.)
When the standard input is connected to a terminal device, gdb uses the asynchronous event loop
by default, unless disabled by the
-noasync
option.
-noasync
Disable the asynchronous event loop for the command-line 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 gdb for remote
debugging.
-tty
device
-t
device
Run using
device
for your program’s standard input and output.
-tui
Activate the Terminal User Interface when starting. The Terminal User Interface manages several
text windows on the terminal, showing source, assembly, registers and gdb command outputs
(refer to Chapter 24
gdb Text User Interface
). Do not use this option if you run gdb from Emacs
(refer to Chapter 25
Using gdb 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 gdb using it as a back end (refer to Chapter
23
Command Interpreters
.
-interpreter=mi
(or
-interpreter=mi2
) causes gdb to use the current
gdb/mi interface
(refer to Chapter 26
The gdb/mi Interface
). The previous gdb/mi interface, included in gdb ver-
sion 5.3, can be selected with
-interpreter=mi1
. Earlier gdb/mi interfaces are not supported.
-write
Open the executable and core files for both reading and writing. This is equivalent to the
set
write on
command inside gdb (refer to Section 16.6
Patching programs
).
-statistics
This option causes gdb to print statistics about time and memory usage after it completes each
command and returns to the prompt.
1. gdb built with djgpp tools for MS-DOS/MS-Windows supports this mode of operation, but the event loop is
suspended when the debuggee runs.
Summary of Contents for ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Page 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......