From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121522 invoked by alias); 9 Jan 2017 18:13:55 -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 121510 invoked by uid 89); 9 Jan 2017 18:13:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_05,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=4.3, 975, stan, Hx-languages-length:2075 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Jan 2017 18:13:44 +0000 Received: by simark.ca (Postfix, from userid 33) id A4F071E931; Mon, 9 Jan 2017 13:13:42 -0500 (EST) To: Yao Qi Subject: Re: [PATCH] Update help of the "frame" command X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 09 Jan 2017 18:13:00 -0000 From: Simon Marchi Cc: Simon Marchi , gdb-patches@sourceware.org In-Reply-To: <20170109172726.GA9518@E107787-LIN> References: <20170106151610.28872-1-simon.marchi@ericsson.com> <20170109172726.GA9518@E107787-LIN> Message-ID: <47dca06e2fcc932db67832e6c1867e92@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00130.txt.bz2 On 2017-01-09 12:27, Yao Qi wrote: > These two lines were added many years ago, > > c906108c (Stan Shebs 1999-04-16 01:35:26 +0000 2632) It can be a > stack frame number or the address of the frame.\n\ > c906108c (Stan Shebs 1999-04-16 01:35:26 +0000 2633) With > argument, nothing is printed if input is coming from\n\ > > Did you do some archaeology to see how GDB did at that time? and then > we may know these help doc is a leftover of some changes. If we can > find them, we are confident to remove these doc. I spent 30 minutes > on c906108c, but didn't find any evidence. Indeed, it's the commit "Initial creation of sourceware repository". I checked out that commit and looked at the code, but couldn't find anything that would suggest that the output of the frame command would not be printed when it's executing in a script or user command. I went earlier using the old tarballs on the website [1], and found that in old gdb's, there was code like this: 965 if (!from_tty) 966 return; 967 968 print_stack_frame (selected_frame, selected_frame_level, 1); The (!from_tty) check disappeared in gdb 4.3. I think it's this change: 873 Thu Oct 24 09:33:44 1991 John Gilmore (gnu at cygnus.com) 874 875 * stack.c (frame_command): Always print. Use new 876 frame_select_command to select a frame without printing. after that, the frame_command function becomes simply: 974 static void 975 frame_command (level_exp, from_tty) 976 char *level_exp; 977 int from_tty; 978 { 979 select_frame_command (level_exp, from_tty); 980 print_stack_frame (selected_frame, selected_frame_level, 1); 981 } So I think it's safe. Side-question, is there a git repo somewhere with all these old gdb versions, those that predate what's in the current git tree? It would be useful to have a repo with one commit per version. Here I had to download many tarballs and bisect manually, but if they had been in a repo it would have been trivial. If it doesn't exist yet, I think I'll do it. [1] ftp://sourceware.org/pub/gdb/old-releases/