Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: [RFA/dwarf] save nested Ada subprograms as global symbol
Date: Wed, 30 Jan 2008 23:57:00 -0000	[thread overview]
Message-ID: <20080130230308.GA12986@caradoc.them.org> (raw)
In-Reply-To: <20080130225833.GG12387@adacore.com>

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


  reply	other threads:[~2008-01-30 23:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-27 18:10 Joel Brobecker
2008-01-29 17:28 ` Daniel Jacobowitz
2008-01-29 21:45   ` Joel Brobecker
2008-01-29 22:34     ` Daniel Jacobowitz
2008-01-30 20:42       ` Joel Brobecker
2008-01-30 21:03         ` Daniel Jacobowitz
2008-01-30 23:06           ` Joel Brobecker
2008-01-30 23:57             ` Daniel Jacobowitz [this message]
2008-02-01 22:50 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080130230308.GA12986@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox