public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/doc: add missing parentheses around prompt in some examples
@ 2021-04-14 12:27 Andrew Burgess
  2021-04-14 12:31 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2021-04-14 12:27 UTC (permalink / raw)
  To: gdb-patches

While reading the manual for -info-os I noticed that the GDB prompt is
given as 'gdb' when it should really be '(gdb)'.  This is because the
prompt is created with: '@value{GDBP}'.

The GDBP variable (the GDB program name) is intended for use as the
prompt string (though this is not used consistently throughout the
manual), however it is normally used like '(@value{GDBP})', but in a
couple of places the enclosing parentheses are missing.

In this commit I do the following:

 - Change '@value{GDBP}' to '(@value{GDBP})' wherever the variable
   represents a prompt string.

 - Replaces '(gdb)' with '(@value{GDBP})' in one example where we are
   already using '(@value{GDBP})', this makes that one example
   consistent.

I have NOT:

 - Changed all instances of '(gdb)' with '(@value{GDBP})', this would
   be a huge change.

gdb/doc/ChangeLog:

	* gdb.texinfo (GDB/MI Miscellaneous Commands): Add missing
	parentheses to GDB prompt in example, and replace '(gdb)' with
	'(@value{GDBP})' in one example where the latter was already in
	use.
---
 gdb/doc/ChangeLog   |  7 +++++++
 gdb/doc/gdb.texinfo | 10 +++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7dbffb65d53..51e1c64a98a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -36513,7 +36513,7 @@
 @subheading Example
 
 @smallexample
-@value{GDBP}
+(@value{GDBP})
 -list-thread-groups
 ^done,groups=[@{id="17",type="process",pid="yyy",num_children="2"@}]
 -list-thread-groups 17
@@ -36561,7 +36561,7 @@
 like this:
 
 @smallexample
-@value{GDBP}
+(@value{GDBP})
 -info-os
 ^done,OSDataTable=@{nr_rows="10",nr_cols="3",
 hdr=[@{width="10",alignment="-1",col_name="col0",colhdr="Type"@},
@@ -36587,7 +36587,7 @@
             col2="Sockets"@},
       item=@{col0="threads",col1="Listing of all threads",
             col2="Threads"@}]
-@value{GDBP}
+(@value{GDBP})
 -info-os processes
 ^done,OSDataTable=@{nr_rows="190",nr_cols="4",
 hdr=[@{width="10",alignment="-1",col_name="col0",colhdr="pid"@},
@@ -36600,7 +36600,7 @@
       ...
       item=@{col0="26446",col1="stan",col2="bash",col3="0"@},
       item=@{col0="28152",col1="stan",col2="bash",col3="1"@}]@}
-(gdb)
+(@value{GDBP})
 @end smallexample
 
 (Note that the MI output here includes a @code{"Title"} column that
@@ -36628,7 +36628,7 @@
 @subheading Example
 
 @smallexample
-@value{GDBP}
+(@value{GDBP})
 -add-inferior
 ^done,inferior="i3"
 @end smallexample
-- 
2.25.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gdb/doc: add missing parentheses around prompt in some examples
  2021-04-14 12:27 [PATCH] gdb/doc: add missing parentheses around prompt in some examples Andrew Burgess
@ 2021-04-14 12:31 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2021-04-14 12:31 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Wed, 14 Apr 2021 13:27:11 +0100
> 
> gdb/doc/ChangeLog:
> 
> 	* gdb.texinfo (GDB/MI Miscellaneous Commands): Add missing
> 	parentheses to GDB prompt in example, and replace '(gdb)' with
> 	'(@value{GDBP})' in one example where the latter was already in
> 	use.

Thanks, this is OK.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-14 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 12:27 [PATCH] gdb/doc: add missing parentheses around prompt in some examples Andrew Burgess
2021-04-14 12:31 ` 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).