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: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 17 Jun 2015 15:17:50 -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> <55683226 dot 5050302 at redhat dot com>
On Fri, May 29, 2015 at 5:32 AM, Pedro Alves <palves@redhat.com> wrote:
> On 05/22/2015 12:23 PM, Patrick Palka wrote:
>
>> + while (isspace (*tmpenv))
>> + tmpenv++;
>
> ...
>
>> +
>> + while (isspace (*endptr))
>> + endptr++;
>
> Use skip_spaces/skip_spaces_const for these.
>
> Otherwise looks good to me.
>
> (I suspect that testing the interaction between setting
> the history both from a .gdbinit and $GDBHISTSIZE would
> call for merging the gdbhistsize-history.exp / gdbinit-history.exp
> to a single file.)
Committed.
The test files would not necessarily have to be merged to test the
interaction between $GDBHISTSIZE and .gdbinit. One may worry about
code duplication by not merging them, but I think there would be code
duplication either way unless you really refactor the tests. I think
it would be easier to test the interaction inside gdbinit-history.exp
since adding environment variable manipulation to gdbinit-history.exp
is easier than adding .gdbinit file manipulation in
gdbhistsize-history.exp. In fact, gdbinit-history.exp already has to
manipulate the environment to unset GDBHISTSIZE. So adding an
interaction test would only require a few lines of code. I'll do it.
>
> Thanks,
> Pedro Alves
>