182
Chapter 21. Controlling gdb
set history filename
fname
Set the name of the gdb command history file to
fname
. This is the file where gdb reads an
initial command history list, and where it writes the command history from this session when it
exits. You can access this list through history expansion or through the history command editing
characters listed below. This file defaults to the value of the environment variable
GDBHISTFILE
,
or to
./.gdb_history
(
./_gdb_history
on MS-DOS) if this variable is not set.
set history save
set history save on
Record command history in a file, whose name may be specified with the
set history
filename
command. By default, this option is disabled.
set history save off
Stop recording command history in a file.
set history size
size
Set the number of commands which gdb keeps in its history list. This defaults to the value of the
environment variable
HISTSIZE
, or to 256 if this variable is not set.
History expansion assigns special meaning to the character
!
.
Since
!
is also the logical not operator in C, history expansion is off by default. If you decide to
enable history expansion with the
set history expansion on
command, you may sometimes
need to follow
!
(when it is used as logical not, in an expression) with a space or a tab to prevent it
from being expanded. The readline history facilities do not attempt substitution on the strings
!=
and
!(
, even when history expansion is enabled.
The commands to control history expansion are:
set history expansion on
set history expansion
Enable history expansion. History expansion is off by default.
set history expansion off
Disable history expansion.
The readline code comes with more complete documentation of editing and history expansion
features. Users unfamiliar with gnu Emacs or
vi
may wish to read it.
show history
show history filename
show history save
show history size
show history expansion
These commands display the state of the gdb history parameters.
show history
by itself dis-
plays all four states.
show commands
Display the last ten commands in the command history.
Содержание ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Страница 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Страница 12: ...2 Chapter 1 Debugging with gdb ...
Страница 28: ...18 Chapter 4 Getting In and Out of gdb ...
Страница 34: ...24 Chapter 5 gdb Commands ...
Страница 44: ...34 Chapter 6 Running Programs Under gdb ...
Страница 68: ...58 Chapter 8 Examining the Stack ...
Страница 98: ...88 Chapter 10 Examining Data ...
Страница 112: ...102 Chapter 12 Tracepoints ...
Страница 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Страница 138: ...128 Chapter 14 Using gdb with Different Languages ...
Страница 144: ...134 Chapter 15 Examining the Symbol Table ...
Страница 170: ...160 Chapter 19 Debugging remote programs ...
Страница 198: ...188 Chapter 21 Controlling gdb ...
Страница 204: ...194 Chapter 22 Canned Sequences of Commands ...
Страница 206: ...196 Chapter 23 Command Interpreters ...
Страница 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Страница 296: ...286 Chapter 27 gdb Annotations ...
Страница 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Страница 322: ...312 Chapter 30 Using History Interactively ...
Страница 362: ...352 Appendix D gdb Remote Serial Protocol ...
Страница 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Страница 386: ...376 Appendix G GNU Free Documentation License ...
Страница 410: ......