diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2015-05-12 06:50:26 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2015-06-17 14:12:19 -0400 |
commit | bc460514b9db46a491c2c39cd118b02608742968 (patch) | |
tree | f69ab69c50811c321f6e2d66a04ceca2ffb766e1 /gdb/NEWS | |
parent | b58c513b7932cfb9852d66e07282b9c2379197ed (diff) | |
download | gdb-bc460514b9db46a491c2c39cd118b02608742968.zip gdb-bc460514b9db46a491c2c39cd118b02608742968.tar.gz gdb-bc460514b9db46a491c2c39cd118b02608742968.tar.bz2 |
Tweak the handling of $GDBHISTSIZE edge cases [PR gdb/16999]
When GDB reads a nonsensical value for the GDBHISTSIZE environment
variable, i.e. one that is non-numeric or negative, GDB then sets its
history size to 0. This behavior is annoying and also inconsistent
with the behavior of bash.
This patch makes the behavior of invalid GDBHISTSIZE consistent with how
bash handles HISTSIZE. When we encounter a null or out-of-range
GDBHISTSIZE (outside of [0, INT_MAX]) we now set the history size to
unlimited instead of 0. When we encounter a non-numeric GDBHISTSIZE we
do nothing.
gdb/ChangeLog:
PR gdb/16999
* NEWS: Mention new GDBHISTSIZE behavior.
* top.c (init_history): For null or out-of-range GDBHISTSIZE,
set history size to unlimited. Ignore non-numeric GDBHISTSIZE.
gdb/doc/ChangeLog:
PR gdb/16999
* gdb.texinfo (Command History): Mention new GDBHISTSIZE
behavior.
gdb/testsuite/ChangeLog:
PR gdb/16999
* gdb.base/gdbhistsize-history.exp: New test.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -64,7 +64,9 @@ * The HISTSIZE environment variable is no longer read when determining the size of GDB's command history. GDB now instead reads the dedicated - GDBHISTSIZE environment variable. + GDBHISTSIZE environment variable. Setting GDBHISTSIZE to "-1" or to "" now + disables truncation of command history. Non-numeric values of GDBHISTSIZE + are ignored. * Guile Scripting |