From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11138 invoked by alias); 30 Jan 2008 23:03:32 -0000 Received: (qmail 11128 invoked by uid 22791); 30 Jan 2008 23:03:31 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 23:03:11 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4B948983F9 for ; Wed, 30 Jan 2008 23:03:09 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3609D9801D for ; Wed, 30 Jan 2008 23:03:09 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JKLxU-0003No-EQ for gdb-patches@sourceware.org; Wed, 30 Jan 2008 18:03:08 -0500 Date: Wed, 30 Jan 2008 23:57:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [RFA/dwarf] save nested Ada subprograms as global symbol Message-ID: <20080130230308.GA12986@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20071227073938.GC10767@adacore.com> <20080129171610.GE2815@caradoc.them.org> <20080129214501.GF16288@adacore.com> <20080129221733.GI15063@caradoc.them.org> <20080130202816.GD12387@adacore.com> <20080130204208.GA3659@caradoc.them.org> <20080130225833.GG12387@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080130225833.GG12387@adacore.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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: 2008-01/txt/msg00837.txt.bz2 On Wed, Jan 30, 2008 at 02:58:33PM -0800, Joel Brobecker wrote: > > If you want to be able to use the name unqualified, then the global > > symbol table sounds like the right place to put it. I'd like > > namespace members and procedures containing nested functions to be > > hierarchical elements in the symbol table, but that's not how it works > > today. > > So is the original patch OK, then? Yes. > > I'd suggest we do the same for nested C functions but it would be a > > horrible mess; they don't have conveniently mangled or qualified names. > > For purely-C nested functions, doesn't it work already? Actually, > I just gave it a try and I was able to break on my nested procedure. > Given: > > int > main (void) > { > void do_nothing (void) {}; > > do_nothing (); > return 0; > } This works because GCC 4 is very aggressive about un-nesting :-) Try something that would require a static chain, e.g. because it accesses the container's locals. -- Daniel Jacobowitz CodeSourcery