gdb/doc: improve 'show print elements' description

Message ID 20211006113159.2503732-1-andrew.burgess@embecosm.com
State New
Headers show
Series
  • gdb/doc: improve 'show print elements' description
Related show

Commit Message

Andrew Burgess Oct. 6, 2021, 11:31 a.m.
The documentation for 'show print elements' contains the line:

  If the number is 0, then the printing is unlimited.

However, this line is now out of date as can be seen by this GDB
session:

  (gdb) set print elements 0
  (gdb) show print elements
  Limit on string chars or array elements to print is unlimited.

The value 0 does indeed mean unlimited, and this is described in the
'set print elements' section, however, for 'show print elements' the
user will never see the value 0, so lets just remove that bit from the
docs.
---
 gdb/doc/gdb.texinfo | 1 -
 1 file changed, 1 deletion(-)

-- 
2.25.4

Comments

Lancelot SIX via Gdb-patches Oct. 6, 2021, 12:47 p.m. | #1
On 10/6/21 1:31 PM, Andrew Burgess wrote:
> The documentation for 'show print elements' contains the line:

> 

>   If the number is 0, then the printing is unlimited.

> 

> However, this line is now out of date as can be seen by this GDB

> session:

> 

>   (gdb) set print elements 0

>   (gdb) show print elements

>   Limit on string chars or array elements to print is unlimited.

> 

> The value 0 does indeed mean unlimited, and this is described in the

> 'set print elements' section, however, for 'show print elements' the

> user will never see the value 0, so lets just remove that bit from the

> docs.


LGTM..

Thanks,
- Tom

> ---

>  gdb/doc/gdb.texinfo | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo

> index c156a1d6739..a6f207a41a7 100644

> --- a/gdb/doc/gdb.texinfo

> +++ b/gdb/doc/gdb.texinfo

> @@ -11376,7 +11376,6 @@

>  

>  @item show print elements

>  Display the number of elements of a large array that @value{GDBN} will print.

> -If the number is 0, then the printing is unlimited.

>  

>  @anchor{set print frame-arguments}

>  @item set print frame-arguments @var{value}

>
Lancelot SIX via Gdb-patches Oct. 6, 2021, 1:01 p.m. | #2
> From: Andrew Burgess <andrew.burgess@embecosm.com>

> Date: Wed,  6 Oct 2021 12:31:59 +0100

> 

> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo

> index c156a1d6739..a6f207a41a7 100644

> --- a/gdb/doc/gdb.texinfo

> +++ b/gdb/doc/gdb.texinfo

> @@ -11376,7 +11376,6 @@

>  

>  @item show print elements

>  Display the number of elements of a large array that @value{GDBN} will print.

> -If the number is 0, then the printing is unlimited.

>  

>  @anchor{set print frame-arguments}

>  @item set print frame-arguments @var{value}


Thanks, this is OK.

Patch

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c156a1d6739..a6f207a41a7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -11376,7 +11376,6 @@ 
 
 @item show print elements
 Display the number of elements of a large array that @value{GDBN} will print.
-If the number is 0, then the printing is unlimited.
 
 @anchor{set print frame-arguments}
 @item set print frame-arguments @var{value}