This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/6] NEWS: Mention "set listsize 0"/"set listsize -1" behavior change.


> 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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]