From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31841 invoked by alias); 23 Aug 2012 16:26:55 -0000 Received: (qmail 31821 invoked by uid 22791); 23 Aug 2012 16:26:50 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Aug 2012 16:26:37 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7NGQYN6008012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Aug 2012 12:26:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7NGQWnv004809; Thu, 23 Aug 2012 12:26:33 -0400 Message-ID: <503659B8.9020107@redhat.com> Date: Thu, 23 Aug 2012 16:26:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Mike Frysinger CC: Eli Zaretskii , Doug Evans , gdb-patches@sourceware.org Subject: further improve "handle" help string References: <1344704080-24677-1-git-send-email-vapier@gentoo.org> <83has5jqex.fsf@gnu.org> <201208142158.42487.vapier@gentoo.org> In-Reply-To: <201208142158.42487.vapier@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-08/txt/msg00669.txt.bz2 On 08/15/2012 02:58 AM, Mike Frysinger wrote: > On Tuesday 14 August 2012 14:10:14 Eli Zaretskii wrote: >>> Date: Tue, 14 Aug 2012 10:34:10 -0700 >>> From: Doug Evans >>> Cc: gdb-patches@sourceware.org, Eli Zaretskii >>> >>> Ok with me, but I'd wait for Eli to check too. >>> >>> Thanks! >> >> I'm quite sure I already did. Mike, is that right? > > i've tweaked the signal wording, but i think the latest iteration covers > everyone's concerns, so i'll merge this and we can fight over improving it > further if need be ;) I'll byte ;-) I'd like to add a mention that you can specify more than one signal (though not complicate and distract the main body of the text with this). I use this occasionally. Text mostly borrowed from the sources. Tested on amd64 Fedora 17. (gdb) help handle Specify how to handle signals. Usage: handle SIGNAL [ACTIONS] Args are signals and actions to apply to those signals. If no actions are specified, the current settings for the specified signals will be displayed instead. Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals from 1-15 are allowed for compatibility with old versions of GDB. Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5). The special arg "all" is recognized to mean all signals except those used by the debugger, typically SIGTRAP and SIGINT. Recognized actions include "stop", "nostop", "print", "noprint", "pass", "nopass", "ignore", or "noignore". Stop means reenter debugger if this signal happens (implies print). Print means print a message if this signal happens. Pass means let program see this signal; otherwise program doesn't know. Ignore is a synonym for nopass and noignore is a synonym for pass. Pass and Stop may be combined. Multiple signals may be specified. Signal numbers and signal names may be interspersed with actions, with the actions being performed for all signals cumulatively specified. (gdb) 2012-08-23 Pedro Alves gdb/ * infrun.c (_initialize_infrun) : Mention that multiple signals are supported. gdb/testsuite/ * gdb.base/help.exp: Adjust to "handle" help text change. --- gdb/infrun.c | 10 +++++++--- gdb/testsuite/gdb.base/help.exp | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 9628170..cbab993 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -7096,10 +7096,10 @@ Specify a signal as argument to print info on that signal only.")); add_info_alias ("handle", "signals", 0); c = add_com ("handle", class_run, handle_command, _("\ -Specify how to handle a signal.\n\ +Specify how to handle signals.\n\ Usage: handle SIGNAL [ACTIONS]\n\ Args are signals and actions to apply to those signals.\n\ -If no actions are specified, the current settings for the specified signal\n\ +If no actions are specified, the current settings for the specified signals\n\ will be displayed instead.\n\ \n\ Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\ @@ -7114,7 +7114,11 @@ Stop means reenter debugger if this signal happens (implies print).\n\ Print means print a message if this signal happens.\n\ Pass means let program see this signal; otherwise program doesn't know.\n\ Ignore is a synonym for nopass and noignore is a synonym for pass.\n\ -Pass and Stop may be combined.")); +Pass and Stop may be combined.\n\ +\n\ +Multiple signals may be specified. Signal numbers and signal names\n\ +may be interspersed with actions, with the actions being performed for\n\ +all signals cumulatively specified.")); set_cmd_completer (c, handle_completer); if (xdb_commands) diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp index b6582ba..7fffd00 100644 --- a/gdb/testsuite/gdb.base/help.exp +++ b/gdb/testsuite/gdb.base/help.exp @@ -219,7 +219,7 @@ gdb_test "help h" "Print list of commands\." "help help \"h\" abbreviation" # test help help gdb_test "help help" "Print list of commands\." "help help" # test help handle -gdb_test "help handle" "Specify how to handle a signal\..*" "help handle" +gdb_test "help handle" "Specify how to handle signals\..*" "help handle" # test help info "i" abbreviation test_prefix_command_help {"i" "info"} { "Generic command for showing things about the program being debugged\.\[\r\n\]+" @@ -699,8 +699,8 @@ gdb_test "help info bogus-gdb-command" "Undefined info command: \"bogus-gdb-comm # test help gotcha gdb_test "help gotcha" "Undefined command: \"gotcha\"\. Try \"help\"\." "help gotcha" # test apropos regex -gdb_test "apropos \\\(print\[\^ bsiedf\\\".-\]\\\)" "handle -- Specify how to handle a signal" +gdb_test "apropos \\\(print\[\^ bsiedf\\\".-\]\\\)" "handle -- Specify how to handle signals" # test apropos >1 word string -gdb_test "apropos handle a signal" "handle -- Specify how to handle a signal" +gdb_test "apropos handle signal" "handle -- Specify how to handle signals" # test apropos apropos gdb_test "apropos apropos" "apropos -- Search for commands matching a REGEXP"