This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Tweak the handling of $GDBHISTSIZE edge cases [PR gdb/16999]
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: Patrick Palka <patrick at parcs dot ath dot cx>
- Date: Fri, 22 May 2015 07:57:30 -0400
- Subject: Re: [PATCH 2/2] Tweak the handling of $GDBHISTSIZE edge cases [PR gdb/16999]
- Authentication-results: sourceware.org; auth=none
- References: <1432293831-23599-1-git-send-email-patrick at parcs dot ath dot cx> <1432293831-23599-2-git-send-email-patrick at parcs dot ath dot cx>
On Fri, May 22, 2015 at 7:23 AM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> 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
> * top.c (init_history): For null or out-of-range GDBHISTSIZE,
> set history size to unlimited. Ignore non-numeric GDBHISTSIZE.
>
Oops, this ChangeLog entry is not complete. I will make sure to
complete it before pushing/re-posting.