From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5606 invoked by alias); 8 Jan 2007 03:30:18 -0000 Received: (qmail 5597 invoked by uid 22791); 8 Jan 2007 03:30:17 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 Jan 2007 03:30:11 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 5B7A548CBBE for ; Sun, 7 Jan 2007 22:29:43 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21196-01 for ; Sun, 7 Jan 2007 22:29:43 -0500 (EST) Received: from takamaka.act-europe.fr (AStDenis-105-1-37-177.w80-8.abo.wanadoo.fr [80.8.138.177]) by nile.gnat.com (Postfix) with ESMTP id 51B2E48CBBB for ; Sun, 7 Jan 2007 22:29:42 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 1000) id 8659734C099; Mon, 8 Jan 2007 07:30:30 +0400 (RET) Date: Mon, 08 Jan 2007 03:30:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA/ada] Improve is_known_support_routine Message-ID: <20070108033030.GB537@adacore.com> References: <20070106182652.GR15512@adacore.com> <20070107233832.GB28585@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070107233832.GB28585@nevyn.them.org> User-Agent: Mutt/1.4.2.2i 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: 2007-01/txt/msg00214.txt.bz2 > > The is_known_support_routine identifies any frame for which we cannot > > find the source file. The check we currently have in place is a bit too > > simplistic, so I replaced it with the function we use to locate source > > files: > > > > - if (stat (sal.symtab->filename, &st)) > > + if (symtab_to_fullname (sal.symtab) == NULL) > > Fine with me, although I wonder if "the source is missing" is really > the concept you want. Why should whether source for the runtime > library is present determine what we show? That would make the > feature more awkward to use for people who built their own libgnat and > still have the build tree. Actually, when I worked on cleaning up that routine, I found that the attached comment was a bit incomplete. Here the new comment explaining the main reason for discarding that frame: /* If there is a symtab, but the associated source file cannot be located, then assume this is not user code: Selecting a frame for which we cannot display the code would not be very helpful for the user. This should also take care of case such as VxWorks where the kernel has some debugging info provided for a few units. */ if (symtab_to_fullname (sal.symtab) == NULL) return 1; In terms of the people building their own libgnat, it is true that this might make it a bit more awkward for them. This is not necessarily true that they would want in this case the debugger to select a frame inside the runtime. So we tried to find a compromise based on our own usage and user feedback that was the most helpful in most cases. -- Joel