This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR gdb/16999
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: patrick at parcs dot ath dot cx
- Cc: gdb-patches at sourceware dot org, patrick at parcs dot ath dot cx
- Date: Thu, 14 May 2015 00:24:21 +0200 (CEST)
- Subject: Re: [PATCH] Fix PR gdb/16999
- Authentication-results: sourceware.org; auth=none
- References: <1431555450-15493-1-git-send-email-patrick at parcs dot ath dot cx>
>
> When GDB reads a nonsensical value for the HISTSIZE environment variable
> variable, i.e. one that is non-numeric or negative, GDB then sets its
> history size to 0. This behavior is contrary to that of bash, which
> defaults the history size to unlimited in such cases.
>
> This patch makes the behavior of invalid HISTSIZE match that of bash.
> When we encounter an invalid HISTSIZE we now set the history size to
> unlimited instead of 0.
The GDB behaviour makes more sense to me especially in light of:
> - /* Prefer ending up with no history rather than overflowing
> - readline's history interface, which uses signed 'int'
> - everywhere. */