| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
set history filename fnameSet 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 saveset history save onRecord 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 offStop recording command history in a file.
set history size sizeSet 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 onset history expansionEnable history expansion. History expansion is off by default.
set history expansion offDisable 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 historyshow history filenameshow history saveshow history sizeshow history expansionThese commands display the state of the GDB history parameters.
show history by itself displays all four states.
show commandsDisplay the last ten commands in the command history.
show commands nPrint ten commands centered on command number n.
show commands +Print ten commands just after the commands last printed.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Build Daemon user on October, 25 2005 using texi2html 1.76.