Command history
History expansion assigns special meaning to the character,
Since
The commands to control history expansion are the following.
set 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 filename
show history save
show history size
show history expansion
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 in the following. This file defaults to the value of the
environment variable GDBHISTFILE, or to ‘./.gdb_history’ if this variable is not set.
Record command history in a file, whose name may be specified with the set history filename command. By default, this option is disabled.
Stop recording command history in a file.
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.
Enable history expansion. History expansion is off by default.
Disable history expansion.
These commands display the state of the GDB history parameters. show history by itself displays all four states.
Display the last ten commands in the command history.
Print ten commands centered on command number, n.
Print ten commands just after the commands last printed.