This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/6] NEWS: Mention "set listsize 0"/"set listsize -1" behavior change.
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 21 Mar 2013 19:11:28 +0000
- Subject: Re: [PATCH 6/6] NEWS: Mention "set listsize 0"/"set listsize -1" behavior change.
- References: <20130321182902 dot 3180 dot 72398 dot stgit at brno dot lan> <20130321182944 dot 3180 dot 80401 dot stgit at brno dot lan> <83vc8ky478 dot fsf at gnu dot org>
On 03/21/2013 06:53 PM, Eli Zaretskii wrote:
> This entry is OK, but I wonder whether it would be better to keep 0 as
> unlimited, and use -1 to disable. This way, we kill 2 birds with one
> stone:
>
> . keep compatibility with old behavior
Yeah, I initially thought of suggesting to revert the original
patch that changed this. But, given the back and forth over time
in the values accepted for "unlimited", we can't really say there's
one real true old behavior. Witness the confusion in the testsuite,
even. (Also, "unlimited" has been broken in the tree that way for
over 7 months, and nobody noticed. Granted, not in a release.) The
current 0 really meaning 0 at least makes sense for new users.
For those reasons, I'm okay with one last behavior change and
sticking with the new current behavior going forward, which is
also now documented in the manual for roughly 7 months now too.
> . keep compatibility with other settings which use zero for
> "unlimited"
I don't think unfortunately there's a real standard. Some
commands choose 0, others choose -1.
I'm finishing a patch that makes literal "set listsize unlimited"
(same for other commands) actually work, so that over time
these "was it -1 or was it 0?" confusions end up largely
being a thing of the past.
--
Pedro Alves