From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98944 invoked by alias); 9 Jul 2017 22:34:29 -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 98932 invoked by uid 89); 9 Jul 2017 22:34:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy4.mail.unifiedlayer.com Received: from gproxy4-pub.mail.unifiedlayer.com (HELO gproxy4.mail.unifiedlayer.com) (69.89.23.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 09 Jul 2017 22:34:27 +0000 Received: from cmgw3 (unknown [10.0.90.84]) by gproxy4.mail.unifiedlayer.com (Postfix) with ESMTP id 811B217782E for ; Sun, 9 Jul 2017 16:34:25 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id imaN1v0092f2jeq01maRNg; Sun, 09 Jul 2017 16:34:25 -0600 X-Authority-Analysis: v=2.2 cv=UM2tJGXy c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=G3gG6ho9WtcA:10 a=20KFwNOVAAAA:8 a=zstS-IiYAAAA:8 a=tPqivHwA52A4Vxp7CBsA:9 a=l70xbShs_AEyNlXa:21 a=sqcAZmVxaHsU6VLZ:21 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 174-29-39-24.hlrn.qwest.net ([174.29.39.24]:36434 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dUKmU-003PFR-9H; Sun, 09 Jul 2017 16:34:22 -0600 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 01/10] Rationalize "backtrace" command line parsing References: <20170425194113.17862-1-tom@tromey.com> <20170425194113.17862-2-tom@tromey.com> <9cfa324d-f685-405f-92be-f74846da4e91@redhat.com> Date: Sun, 09 Jul 2017 22:34:00 -0000 In-Reply-To: <9cfa324d-f685-405f-92be-f74846da4e91@redhat.com> (Pedro Alves's message of "Tue, 27 Jun 2017 17:24:57 +0100") Message-ID: <87shi5me8i.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Exim-ID: 1dUKmU-003PFR-9H X-Source-Sender: 174-29-39-24.hlrn.qwest.net (bapiya) [174.29.39.24]:36434 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2017-07/txt/msg00051.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> It might be good to clarify "help bt", to show something around: Pedro> Usage: backtrace [QUALIFIERS]... COUNT How about the appended? Tom commit 46ab61faf8412739124639aac528d2b7df387632 Author: Tom Tromey Date: Sun Jul 9 16:31:11 2017 -0600 Improve "backtrace" help text This improves help text in stack.c in two ways. First, it removes trailing newlines from various help strings. I think these are never needed. Second, it adds a "Usage" line to the "backtrace" text, as suggested by Pedro. ChangeLog 2017-07-09 Tom Tromey * stack.c (_initialize_stack): Remove trailing newlines from help text. Add "Usage" line to "backtrace" help. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 210bebc..73b463e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-07-09 Tom Tromey + + * stack.c (_initialize_stack): Remove trailing newlines from help + text. Add "Usage" line to "backtrace" help. + 2017-04-25 Tom Tromey PR python/16486: diff --git a/gdb/stack.c b/gdb/stack.c index 4f6b117..5df25c4 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -2589,22 +2589,23 @@ This is useful in command scripts.")); Select and print a stack frame.\nWith no argument, \ print the selected stack frame. (See also \"info frame\").\n\ An argument specifies the frame to select.\n\ -It can be a stack frame number or the address of the frame.\n")); +It can be a stack frame number or the address of the frame.")); add_com_alias ("f", "frame", class_stack, 1); add_com_suppress_notification ("select-frame", class_stack, select_frame_command, _("\ Select a stack frame without printing anything.\n\ An argument specifies the frame to select.\n\ -It can be a stack frame number or the address of the frame.\n"), +It can be a stack frame number or the address of the frame."), &cli_suppress_notification.user_selected_context); add_com ("backtrace", class_stack, backtrace_command, _("\ Print backtrace of all stack frames, or innermost COUNT frames.\n\ -With a negative argument, print outermost -COUNT frames.\nUse of the \ -'full' qualifier also prints the values of the local variables.\n\ +Usage: backtrace [QUALIFIERS]... [COUNT]\n\ +With a negative argument, print outermost -COUNT frames.\n\ +Use of the 'full' qualifier also prints the values of the local variables.\n\ Use of the 'no-filters' qualifier prohibits frame filters from executing\n\ -on this backtrace.\n")); +on this backtrace.")); add_com_alias ("bt", "backtrace", class_stack, 0); add_com_alias ("where", "backtrace", class_alias, 0); @@ -2622,7 +2623,7 @@ on this backtrace.\n")); if (dbx_commands) add_com ("func", class_stack, func_command, _("\ Select the stack frame that contains .\n\ -Usage: func \n")); +Usage: func ")); add_setshow_enum_cmd ("frame-arguments", class_stack, print_frame_arguments_choices, &print_frame_arguments,