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: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 21 Mar 2013 20:53:47 +0200
- 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>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 21 Mar 2013 18:29:44 +0000
>
> gdb/
> 2013-03-21 Pedro Alves <palves@redhat.com>
>
> * NEWS: Mention "set listsize 0"/"set listsize -1" behavior
> change.
> ---
> gdb/NEWS | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index b759adf..ef310bb 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -111,6 +111,18 @@ x86_64/Cygwin x86_64-*-cygwin*
> * The command 'info tracepoints' can now display 'installed on target'
> or 'not installed on target' for each non-pending location of tracepoint.
>
> +* 'set listsize -1' and 'set listsize 0' behavior change.
> +
> + Now, -1 as argument to 'set listsize' means there's no line limit
> + and 0 suppresses display of source lines. Previously, 0 meant that
> + there was no limit, and negative numbers were not allowed. The
> + table below sums it up:
> +
> + | before | after |
> + |----+-----------+-----------|
> + | -1 | invalid | unlimited |
> + | 0 | unlimited | really 0 |
> +
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
. keep compatibility with other settings which use zero for
"unlimited"