From: Pedro Alves <palves@redhat.com>
To: Patrick Palka <patrick@parcs.ath.cx>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix PR gdb/16999
Date: Thu, 14 May 2015 09:16:00 -0000 [thread overview]
Message-ID: <555467EA.5020809@redhat.com> (raw)
In-Reply-To: <CA+C-WL_81cSgvUPes8d18z0Ov_gEUcn=f2dfsDb6geKmd4uUmg@mail.gmail.com>
On 05/13/2015 11:38 PM, Patrick Palka wrote:
> On Wed, May 13, 2015 at 6:24 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>>>
>>> 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.
...
> I personally don't like GDB's behavior because 1) it's not consistent
> with bash and 2) it's unforgiving: a mere typo when setting HISTSIZE
> will truncate the entire history file at exit.
I agree. Users can well set HISTSIZE to -1 in their ~/.bashrc to affect
bash's history, and then it's very annoying that GDB ends up with no
history... As we're reusing this environment variable from bash, I
think the right thing to do is follow whatever bash does.
(BTW, like we have GDBHISTFILE vs bash's HISTFILE, it may be
good to have a GDBHISTSIZE to override HISTSIZE without affecting
bash.)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-05-14 9:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 22:17 Patrick Palka
2015-05-13 22:24 ` Mark Kettenis
2015-05-13 22:38 ` Patrick Palka
2015-05-14 9:16 ` Pedro Alves [this message]
2015-05-14 10:16 ` Pedro Alves
2015-05-14 12:06 ` Patrick Palka
2015-05-15 10:42 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555467EA.5020809@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=patrick@parcs.ath.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).