From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42031 invoked by alias); 6 Jan 2017 16:25:38 -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 42005 invoked by uid 89); 6 Jan 2017 16:25:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Marchi, marchi, corrections, H*M:4d78 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jan 2017 16:25:36 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cPXKg-0000pc-Dq from Luis_Gustavo@mentor.com ; Fri, 06 Jan 2017 08:25:34 -0800 Received: from [172.30.8.13] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 6 Jan 2017 08:25:31 -0800 Subject: Re: [PATCH] Update help of the "frame" command References: <20170106151610.28872-1-simon.marchi@ericsson.com> To: Simon Marchi , Reply-To: Luis Machado From: Luis Machado Message-ID: <8d8974b9-4d78-62ba-bd66-d991fdcf2be7@codesourcery.com> Date: Fri, 06 Jan 2017 16:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170106151610.28872-1-simon.marchi@ericsson.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00097.txt.bz2 On 01/06/2017 09:16 AM, Simon Marchi wrote: > The help message of the "frame" command states that nothing is printed > if the command is executed from the command file or user-defined > command. My testing leads me to think that this is not true (at least > today). > > (gdb) bt > #0 bar (n=17) at test.c:9 > #1 0x00000000004006e0 in foo (v=17) at test.c:13 > #2 0x00000000004006f0 in main () at test.c:21 > (gdb) frame > #0 bar (n=17) at test.c:9 > 9 baz(n); > (gdb) define foo > Type commands for definition of "foo". > End with a line saying just "end". > >frame 1 > >end > (gdb) foo > #1 0x00000000004006e0 in foo (v=17) at test.c:13 > 13 bar(v); > > This patch simply removes that bit from the help message. I didn't find > anything corresponding to this in the documentation that needs to be > fixed. > > gdb/ChangeLog: > > * stack.c (_initialize_stack): Update "frame" command help message. > --- > gdb/stack.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/gdb/stack.c b/gdb/stack.c > index 64224d0aad..201a358833 100644 > --- a/gdb/stack.c > +++ b/gdb/stack.c > @@ -2666,9 +2666,7 @@ 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\ > -With argument, nothing is printed if input is coming from\n\ > -a command file or a user-defined command.")); > +It can be a stack frame number or the address of the frame.\n")); > > add_com_alias ("f", "frame", class_stack, 1); > > Sounds reasonable to me. I ran into other help text block inconsistencies. It looks like there is potential for more corrections in that area.