Chapter 21.
Controlling gdb
You can alter the way gdb interacts with you by using the
set
command. For commands controlling
how gdb displays data, (refer to Section 10.7
Print settings
. Other settings are described here.
21.1. Prompt
gdb indicates its readiness to read a command by printing a string called the
prompt
. This string is
normally
(gdb)
. You can change the prompt string with the
set prompt
command. For instance,
when debugging gdb with gdb, it is useful to change the prompt in one of the gdb sessions so that you
can always tell which one you are talking to.
Note:
set prompt
does not add a space for you after the prompt you set. This allows you to set a
prompt which ends in a space or a prompt that does not.
set prompt
newprompt
Directs gdb to use
newprompt
as its prompt string henceforth.
show prompt
Prints a line of the form:
Gdb’s prompt is:
your-prompt
21.2. Command editing
gdb reads its input commands via the
readline
interface. This gnu library provides consistent behavior
for programs which provide a command line interface to the user. Advantages are gnu Emacs-style
or
vi
-style inline editing of commands,
csh
-like history substitution, and a storage and recall of com-
mand history across debugging sessions.
You may control the behavior of command line editing in gdb with the command
set
.
set editing
set editing on
Enable command line editing (enabled by default).
set editing off
Disable command line editing.
show editing
Show whether command line editing is enabled.
21.3. Command history
gdb can keep track of the commands you type during your debugging sessions, so that you can be
certain of precisely what happened. Use these commands to manage the gdb command history facility.
Summary of Contents for ENTERPRISE LINUX 3 - SECURITY GUIDE
Page 1: ...Red Hat Enterprise Linux 3 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: ......