aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog7
-rw-r--r--gdb/doc/gdb.texinfo25
2 files changed, 29 insertions, 3 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index c7f0243..95b6843 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.texinfo (Command History): Extend description for
+ GDBHISTFILE and GDBHISTSIZE, add detail about the filename for
+ 'set history filename' being optional. Describe the effect of an
+ empty history filename on 'set history save on'.
+
2020-02-24 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.texinfo (Threads): Fix alignment in 'info threads' example
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index b947c5d..32e419e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25306,7 +25306,7 @@ history.
@cindex history file
@kindex set history filename
@cindex @env{GDBHISTFILE}, environment variable
-@item set history filename @var{fname}
+@item set history filename @r{[}@var{fname}@r{]}
Set the name of the @value{GDBN} command history file to @var{fname}.
This is the file where @value{GDBN} reads an initial command history
list, and where it writes the command history from this session when it
@@ -25316,15 +25316,29 @@ to the value of the environment variable @code{GDBHISTFILE}, or to
@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
is not set.
+The @code{GDBHISTFILE} environment variable is read after processing
+any @value{GDBN} initialization files (@pxref{Startup}) and after
+processing any commands passed using command line options (for
+example, @code{-ex}).
+
+If the @var{fname} argument is not given, or if the @code{GDBHISTFILE}
+is the empty string then @value{GDBN} will neither try to load an
+existing history file, nor will it try to save the history on exit.
+
@cindex save command history
@kindex set history save
@item set history save
@itemx set history save on
Record command history in a file, whose name may be specified with the
-@code{set history filename} command. By default, this option is disabled.
+@code{set history filename} command. By default, this option is
+disabled. The command history will be recorded when @value{GDBN}
+exits. If @code{set history filename} is set to the empty string then
+history saving is disabled, even when @code{set history save} is
+@code{on}.
@item set history save off
-Stop recording command history in a file.
+Don't record the command history into the file specified by @code{set
+history filename} when @value{GDBN} exits.
@cindex history size
@kindex set history size
@@ -25338,6 +25352,11 @@ are ignored. If @var{size} is @code{unlimited} or if @env{GDBHISTSIZE} is
either a negative number or the empty string, then the number of commands
@value{GDBN} keeps in the history list is unlimited.
+The @code{GDBHISTSIZE} environment variable is read after processing
+any @value{GDBN} initialization files (@pxref{Startup}) and after
+processing any commands passed using command line options (for
+example, @code{-ex}).
+
@cindex remove duplicate history
@kindex set history remove-duplicates
@item set history remove-duplicates @var{count}