Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 01/12] Fix help and documentation for inferior commands
Date: Mon, 30 Apr 2018 14:37:00 -0000	[thread overview]
Message-ID: <20180430143731.30007-2-tom@tromey.com> (raw)
In-Reply-To: <20180430143731.30007-1-tom@tromey.com>

This changes inferior.c to add Usage lines for all commands, and to
change how "metasyntactic variables" are written to conform to GNU
style.

While doing this I noticed that the manual doesn't document the
argument to "info inferiors", so I've added that as well.

ChangeLog
2018-04-27  Tom Tromey  <tom@tromey.com>

	* inferior.c (initialize_inferiors): Update help strings.

doc/ChangeLog
2018-04-27  Tom Tromey  <tom@tromey.com>

	* gdb.texinfo (Inferiors and Programs): Document argument to "info
	inferiors".
---
 gdb/ChangeLog       |  4 ++++
 gdb/doc/ChangeLog   |  5 +++++
 gdb/doc/gdb.texinfo |  4 +++-
 gdb/inferior.c      | 18 ++++++++++++------
 4 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 28f083f96e..a25ada6e28 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2708,9 +2708,11 @@ To find out what inferiors exist at any moment, use @w{@code{info
 inferiors}}:
 
 @table @code
-@kindex info inferiors
+@kindex info inferiors [ @var{ID}@dots{} ]
 @item info inferiors
 Print a list of all inferiors currently being managed by @value{GDBN}.
+By default all inferiors are printed, but an argument can be used to
+limit the display to just the requested inferiors.
 
 @value{GDBN} displays for each inferior (in this order):
 
diff --git a/gdb/inferior.c b/gdb/inferior.c
index d7122fcfad..ec2f985919 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -996,12 +996,15 @@ initialize_inferiors (void)
   /* The architecture will be initialized shortly, by
      initialize_current_architecture.  */
 
-  add_info ("inferiors", info_inferiors_command, 
-	    _("IDs of specified inferiors (all inferiors if no argument)."));
+  add_info ("inferiors", info_inferiors_command,
+	    _("Print a list of inferiors being managed.\n\
+Usage: info inferiors [ID]...\n\
+If IDs are specified, the list is limited to just those inferiors.\n\
+By default all inferiors are displayed."));
 
   c = add_com ("add-inferior", no_class, add_inferior_command, _("\
 Add a new inferior.\n\
-Usage: add-inferior [-copies <N>] [-exec <FILENAME>]\n\
+Usage: add-inferior [-copies N] [-exec FILENAME]\n\
 N is the optional number of inferiors to add, default is 1.\n\
 FILENAME is the file name of the executable to use\n\
 as main program."));
@@ -1013,22 +1016,25 @@ Usage: remove-inferiors ID..."));
 
   add_com ("clone-inferior", no_class, clone_inferior_command, _("\
 Clone inferior ID.\n\
-Usage: clone-inferior [-copies <N>] [ID]\n\
+Usage: clone-inferior [-copies N] [ID]\n\
 Add N copies of inferior ID.  The new inferior has the same\n\
 executable loaded as the copied inferior.  If -copies is not specified,\n\
 adds 1 copy.  If ID is not specified, it is the current inferior\n\
 that is cloned."));
 
   add_cmd ("inferiors", class_run, detach_inferior_command, _("\
-Detach from inferior ID (or list of IDS)."),
+Detach from inferior ID (or list of IDS).\n\
+Usage; detach inferiors ID..."),
 	   &detachlist);
 
   add_cmd ("inferiors", class_run, kill_inferior_command, _("\
-Kill inferior ID (or list of IDs)."),
+Kill inferior ID (or list of IDs).\n\
+Usage: kill inferiors ID..."),
 	   &killlist);
 
   add_cmd ("inferior", class_run, inferior_command, _("\
 Use this command to switch between inferiors.\n\
+Usage: inferior ID\n\
 The new inferior ID must be currently known."),
 	   &cmdlist);
 
-- 
2.13.6


  parent reply	other threads:[~2018-04-30 14:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 14:37 [RFA 00/12] Small help text tweaks Tom Tromey
2018-04-30 14:37 ` [RFA 03/12] Update core-related help strings Tom Tromey
2018-05-04 18:11   ` Pedro Alves
2018-05-09 20:31     ` Tom Tromey
2018-05-24 21:28       ` Pedro Alves
2018-04-30 14:37 ` [RFA 07/12] Update help text for "jump" command Tom Tromey
2018-05-04 18:52   ` Pedro Alves
2018-04-30 14:37 ` [RFA 09/12] Update help text in tracepoint.c Tom Tromey
2018-05-04 18:54   ` Pedro Alves
2018-04-30 14:37 ` [RFA 05/12] Update help strings in TUI Tom Tromey
2018-05-04 18:26   ` Pedro Alves
2018-04-30 14:37 ` [RFA 10/12] Update help text in record-btrace.c Tom Tromey
2018-05-04 18:55   ` Pedro Alves
2018-04-30 14:37 ` [RFA 11/12] Update help text in linux-fork.c Tom Tromey
2018-05-04 18:56   ` Pedro Alves
2018-04-30 14:37 ` [RFA 04/12] Update memattr.c help strings Tom Tromey
2018-05-04 18:16   ` Pedro Alves
2018-05-09 20:35     ` Tom Tromey
2018-05-24 17:53       ` Pedro Alves
2018-04-30 14:37 ` [RFA 12/12] Update help text in record.c Tom Tromey
2018-05-04 18:57   ` Pedro Alves
2018-04-30 14:37 ` [RFA 02/12] Update help strings in skip.c Tom Tromey
2018-05-04 18:09   ` Pedro Alves
2018-04-30 14:37 ` Tom Tromey [this message]
2018-04-30 15:26   ` [RFA 01/12] Fix help and documentation for inferior commands Eli Zaretskii
2018-05-04 18:07     ` Pedro Alves
2018-05-09 20:29     ` Tom Tromey
2018-05-10  9:17       ` Eli Zaretskii
2018-04-30 14:37 ` [RFA 06/12] Update help text in dcache.c Tom Tromey
2018-05-04 18:27   ` Pedro Alves
2018-04-30 14:37 ` [RFA 08/12] Update help text in disasm.c Tom Tromey
2018-05-04 18:54   ` Pedro Alves
2018-04-30 14:40 ` [RFA 00/12] Small help text tweaks Eli Zaretskii
2018-04-30 15:13   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180430143731.30007-2-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox