From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91221 invoked by alias); 30 Apr 2018 14:37:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 91121 invoked by uid 89); 30 Apr 2018 14:37:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=displayed X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.194.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 14:37:34 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 9779710496 for ; Mon, 30 Apr 2018 09:37:33 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id D9vpfPY5aA3CSD9vpfUOm2; Mon, 30 Apr 2018 09:37:33 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:38242 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fD9vp-003hNM-D9; Mon, 30 Apr 2018 09:37:33 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 01/12] Fix help and documentation for inferior commands Date: Mon, 30 Apr 2018 14:37:00 -0000 Message-Id: <20180430143731.30007-2-tom@tromey.com> In-Reply-To: <20180430143731.30007-1-tom@tromey.com> References: <20180430143731.30007-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fD9vp-003hNM-D9 X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:38242 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-04/txt/msg00642.txt.bz2 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 * inferior.c (initialize_inferiors): Update help strings. doc/ChangeLog 2018-04-27 Tom Tromey * 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 ] [-exec ]\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 ] [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