* [PATCH] Fix inconsistent input/output of example
@ 2022-05-18 13:35 Nikolaos Chatzikonstantinou
2022-05-18 15:30 ` Andrew Burgess
0 siblings, 1 reply; 8+ messages in thread
From: Nikolaos Chatzikonstantinou @ 2022-05-18 13:35 UTC (permalink / raw)
To: Nikolaos Chatzikonstantinou via Gdb-patches
[-- Attachment #1: Type: text/plain, Size: 117 bytes --]
I corrected an example in 10.10.3 of the info page.
I am not certain of it; please double-check.
See attached patch.
[-- Attachment #2: 0001-Fix-inconsistent-input-output-of-example.patch --]
[-- Type: text/x-patch, Size: 852 bytes --]
From 032dca4a43aa61c89208c2ffd978ef1dd121898d Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Date: Wed, 18 May 2022 22:28:02 +0900
Subject: [PATCH] Fix inconsistent input/output of example
To: gdb-patches@sourceware.org
The shown output corresponds to an 'info pretty-printer' without an
object-regexp, however the input was a 'library2' regexp.
---
gdb/doc/gdb.texinfo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9df109ba330..7d2555455d0 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12110,7 +12110,7 @@ library2.so:
(gdb) disable pretty-printer library2 bar
1 printer disabled
0 of 3 printers enabled
-(gdb) info pretty-printer library2
+(gdb) info pretty-printer
library1.so:
foo [disabled]
library2.so:
--
2.35.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix inconsistent input/output of example
2022-05-18 13:35 [PATCH] Fix inconsistent input/output of example Nikolaos Chatzikonstantinou
@ 2022-05-18 15:30 ` Andrew Burgess
2022-05-18 21:14 ` Nikolaos Chatzikonstantinou
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Burgess @ 2022-05-18 15:30 UTC (permalink / raw)
To: Nikolaos Chatzikonstantinou, Nikolaos Chatzikonstantinou via Gdb-patches
Nikolaos Chatzikonstantinou via Gdb-patches <gdb-patches@sourceware.org>
writes:
> I corrected an example in 10.10.3 of the info page.
> I am not certain of it; please double-check.
> See attached patch.
> From 032dca4a43aa61c89208c2ffd978ef1dd121898d Mon Sep 17 00:00:00 2001
> From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
> Date: Wed, 18 May 2022 22:28:02 +0900
> Subject: [PATCH] Fix inconsistent input/output of example
> To: gdb-patches@sourceware.org
>
> The shown output corresponds to an 'info pretty-printer' without an
> object-regexp, however the input was a 'library2' regexp.
> ---
> gdb/doc/gdb.texinfo | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 9df109ba330..7d2555455d0 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -12110,7 +12110,7 @@ library2.so:
> (gdb) disable pretty-printer library2 bar
> 1 printer disabled
> 0 of 3 printers enabled
> -(gdb) info pretty-printer library2
> +(gdb) info pretty-printer
This change looks correct to me, however, the same mistake is repeated a
few lines earlier in the example, it would be good to fix them both at
the same time I think.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix inconsistent input/output of example
2022-05-18 15:30 ` Andrew Burgess
@ 2022-05-18 21:14 ` Nikolaos Chatzikonstantinou
2022-05-19 14:24 ` [PUSHED 0/3] " Andrew Burgess
0 siblings, 1 reply; 8+ messages in thread
From: Nikolaos Chatzikonstantinou @ 2022-05-18 21:14 UTC (permalink / raw)
To: Andrew Burgess; +Cc: Nikolaos Chatzikonstantinou via Gdb-patches
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
On Thu, May 19, 2022 at 12:30 AM Andrew Burgess <aburgess@redhat.com> wrote:
> This change looks correct to me, however, the same mistake is repeated a
> few lines earlier in the example, it would be good to fix them both at
> the same time I think.
I'm attaching a patch that fixes both.
[-- Attachment #2: 0001-Fix-inconsistent-input-output-of-example.patch --]
[-- Type: text/x-patch, Size: 921 bytes --]
From 26a91b493e383d7c6405fefe58b15a37c497f10b Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Date: Wed, 18 May 2022 22:28:02 +0900
Subject: [PATCH] Fix inconsistent input/output of example
To: gdb-patches@sourceware.org
---
gdb/doc/gdb.texinfo | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9df109ba330..8b82a65beeb 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12101,8 +12101,6 @@ library2.so:
1 printer disabled
1 of 3 printers enabled
(gdb) info pretty-printer library2
-library1.so:
- foo [disabled]
library2.so:
bar
bar1 [disabled]
@@ -12110,7 +12108,7 @@ library2.so:
(gdb) disable pretty-printer library2 bar
1 printer disabled
0 of 3 printers enabled
-(gdb) info pretty-printer library2
+(gdb) info pretty-printer
library1.so:
foo [disabled]
library2.so:
--
2.35.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PUSHED 0/3] Re: [PATCH] Fix inconsistent input/output of example
2022-05-18 21:14 ` Nikolaos Chatzikonstantinou
@ 2022-05-19 14:24 ` Andrew Burgess
2022-05-19 14:24 ` [PUSHED 1/3] gdb/doc: fix inconsistent info pretty-printer example Andrew Burgess
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Andrew Burgess @ 2022-05-19 14:24 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Nikolaos Chatzikonstantinou,
Thanks, I pushed your patch. While applying this I spotted some
additional improvements that could be made to the 'info
pretty-printer' example, so I pushed those too.
Here's what I applied.
Thanks,
Andrew
---
Andrew Burgess (2):
gdb/doc: make use of group/end group in 'info pretty-printers' example
gdb/doc: use @value{GDBP} in 'info pretty-printer' example
Nikolaos Chatzikonstantinou (1):
gdb/doc: fix inconsistent info pretty-printer example
gdb/doc/gdb.texinfo | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
--
2.25.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PUSHED 1/3] gdb/doc: fix inconsistent info pretty-printer example
2022-05-19 14:24 ` [PUSHED 0/3] " Andrew Burgess
@ 2022-05-19 14:24 ` Andrew Burgess
2022-05-19 14:24 ` [PUSHED 2/3] gdb/doc: make use of group/end group in 'info pretty-printers' example Andrew Burgess
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Andrew Burgess @ 2022-05-19 14:24 UTC (permalink / raw)
To: gdb-patches; +Cc: Nikolaos Chatzikonstantinou
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
The example for 'info pretty-printer' in the manual passes an
object-regexp in some cases, but presents output as though no
object-regexp was passed.
This commit fixes the two mistakes, in one case, fixing the output to
filter based on object-regexp, and in the other, to remove the
object-regexp from the command and leave all the output.
---
gdb/doc/gdb.texinfo | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8cf97866ccc..68f7aba8d7d 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12101,8 +12101,6 @@
1 printer disabled
1 of 3 printers enabled
(gdb) info pretty-printer library2
-library1.so:
- foo [disabled]
library2.so:
bar
bar1 [disabled]
@@ -12110,7 +12108,7 @@
(gdb) disable pretty-printer library2 bar
1 printer disabled
0 of 3 printers enabled
-(gdb) info pretty-printer library2
+(gdb) info pretty-printer
library1.so:
foo [disabled]
library2.so:
--
2.25.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PUSHED 2/3] gdb/doc: make use of group/end group in 'info pretty-printers' example
2022-05-19 14:24 ` [PUSHED 0/3] " Andrew Burgess
2022-05-19 14:24 ` [PUSHED 1/3] gdb/doc: fix inconsistent info pretty-printer example Andrew Burgess
@ 2022-05-19 14:24 ` Andrew Burgess
2022-05-19 14:24 ` [PUSHED 3/3] gdb/doc: use @value{GDBP} in 'info pretty-printer' example Andrew Burgess
2022-05-19 15:54 ` [PUSHED 0/3] Re: [PATCH] Fix inconsistent input/output of example Eli Zaretskii
3 siblings, 0 replies; 8+ messages in thread
From: Andrew Burgess @ 2022-05-19 14:24 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
The 'info pretty-printers' example is pretty long and consists of many
commands and their output.
Currently, when the pdf manual is generated this example spans a
page-break, with the page-break falling part way through some example
output from GDB.
This commit breaks up the example using @group .... @end group, within
each group is a single GDB command and all its output.
Now, when the pdf manual is created, the page-break is placed after
the output of one GDB command, and before the subsequent command, this
looks much nicer.
---
gdb/doc/gdb.texinfo | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 68f7aba8d7d..76fc548fc84 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12075,6 +12075,7 @@
@code{bar1} and @code{bar2}.
@smallexample
+@group
(gdb) info pretty-printer
library1.so:
foo
@@ -12082,11 +12083,15 @@
bar
bar1
bar2
+@end group
+@group
(gdb) info pretty-printer library2
library2.so:
bar
bar1
bar2
+@end group
+@group
(gdb) disable pretty-printer library1
1 printer disabled
2 of 3 printers enabled
@@ -12097,6 +12102,8 @@
bar
bar1
bar2
+@end group
+@group
(gdb) disable pretty-printer library2 bar;bar1
1 printer disabled
1 of 3 printers enabled
@@ -12105,6 +12112,8 @@
bar
bar1 [disabled]
bar2
+@end group
+@group
(gdb) disable pretty-printer library2 bar
1 printer disabled
0 of 3 printers enabled
@@ -12115,6 +12124,7 @@
bar [disabled]
bar1 [disabled]
bar2
+@end group
@end smallexample
Note that for @code{bar} the entire printer can be disabled,
--
2.25.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PUSHED 3/3] gdb/doc: use @value{GDBP} in 'info pretty-printer' example
2022-05-19 14:24 ` [PUSHED 0/3] " Andrew Burgess
2022-05-19 14:24 ` [PUSHED 1/3] gdb/doc: fix inconsistent info pretty-printer example Andrew Burgess
2022-05-19 14:24 ` [PUSHED 2/3] gdb/doc: make use of group/end group in 'info pretty-printers' example Andrew Burgess
@ 2022-05-19 14:24 ` Andrew Burgess
2022-05-19 15:54 ` [PUSHED 0/3] Re: [PATCH] Fix inconsistent input/output of example Eli Zaretskii
3 siblings, 0 replies; 8+ messages in thread
From: Andrew Burgess @ 2022-05-19 14:24 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Update the 'info pretty-printer' example in the manual to make use of
@value{GDBP} instead of hard-coding '(gdb)'.
---
gdb/doc/gdb.texinfo | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 76fc548fc84..90c307a7dd2 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12076,7 +12076,7 @@
@smallexample
@group
-(gdb) info pretty-printer
+(@value{GDBP}) info pretty-printer
library1.so:
foo
library2.so:
@@ -12085,17 +12085,17 @@
bar2
@end group
@group
-(gdb) info pretty-printer library2
+(@value{GDBP}) info pretty-printer library2
library2.so:
bar
bar1
bar2
@end group
@group
-(gdb) disable pretty-printer library1
+(@value{GDBP}) disable pretty-printer library1
1 printer disabled
2 of 3 printers enabled
-(gdb) info pretty-printer
+(@value{GDBP}) info pretty-printer
library1.so:
foo [disabled]
library2.so:
@@ -12104,20 +12104,20 @@
bar2
@end group
@group
-(gdb) disable pretty-printer library2 bar;bar1
+(@value{GDBP}) disable pretty-printer library2 bar;bar1
1 printer disabled
1 of 3 printers enabled
-(gdb) info pretty-printer library2
+(@value{GDBP}) info pretty-printer library2
library2.so:
bar
bar1 [disabled]
bar2
@end group
@group
-(gdb) disable pretty-printer library2 bar
+(@value{GDBP}) disable pretty-printer library2 bar
1 printer disabled
0 of 3 printers enabled
-(gdb) info pretty-printer
+(@value{GDBP}) info pretty-printer
library1.so:
foo [disabled]
library2.so:
--
2.25.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PUSHED 0/3] Re: [PATCH] Fix inconsistent input/output of example
2022-05-19 14:24 ` [PUSHED 0/3] " Andrew Burgess
` (2 preceding siblings ...)
2022-05-19 14:24 ` [PUSHED 3/3] gdb/doc: use @value{GDBP} in 'info pretty-printer' example Andrew Burgess
@ 2022-05-19 15:54 ` Eli Zaretskii
3 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-05-19 15:54 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
> Date: Thu, 19 May 2022 15:24:31 +0100
> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
> Cc: Andrew Burgess <aburgess@redhat.com>
>
> Nikolaos Chatzikonstantinou,
>
> Thanks, I pushed your patch. While applying this I spotted some
> additional improvements that could be made to the 'info
> pretty-printer' example, so I pushed those too.
>
> Here's what I applied.
Thank you for taking care of the GDB documentation.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-19 15:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 13:35 [PATCH] Fix inconsistent input/output of example Nikolaos Chatzikonstantinou
2022-05-18 15:30 ` Andrew Burgess
2022-05-18 21:14 ` Nikolaos Chatzikonstantinou
2022-05-19 14:24 ` [PUSHED 0/3] " Andrew Burgess
2022-05-19 14:24 ` [PUSHED 1/3] gdb/doc: fix inconsistent info pretty-printer example Andrew Burgess
2022-05-19 14:24 ` [PUSHED 2/3] gdb/doc: make use of group/end group in 'info pretty-printers' example Andrew Burgess
2022-05-19 14:24 ` [PUSHED 3/3] gdb/doc: use @value{GDBP} in 'info pretty-printer' example Andrew Burgess
2022-05-19 15:54 ` [PUSHED 0/3] Re: [PATCH] Fix inconsistent input/output of example Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).