This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2003 20:12:28 -0000
- Subject: [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
- References: <20030606185655.11114.carlton@bactrian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11114
------- Additional Comments From dberlin@dberlin.org 2003-06-06 20:12 -------
Subject: Re: GCC doesn't generate DW_TAG_namespace entries
> I suspect that there's a problem even with the patch that Andrew
> referenced.
> I don't know for sure, but I'm using a variant of that patch with GCC
> 3.2.3,
> and I know that there's a problem with the variant that I'm using.
Try it on the mainline with the patch, see if it still occurs.
There are significant changes in the way C++ works since 3.2.3.
> In some
> contexts, if you have a templated class Temp and you instantiate it
> like
>
> Temp<NS::C>
>
> where C is a class living in a namespace NS, then, if the DIE for NS
> hasn't
> been emitted yet, then that die gets created as a child of the DIE for
> Temp<NS::C> instead of as a chield of the comp unit DIE.
>
I forget where namespaces can occur in C++, but you can make it set the
child to be the closest context that is a valid place for a namespace
to go.
> I'm playing around with trying to fix that (though I'm not an expert on
> dwarf2out.c (or any of GCC!), so I could use some help);
I would help in general, but I don't even *have* 3.2.3 around anymore.
> if I do manage
> to fix it, I'll attach a revised patch here. (Maybe even a test case
> if
> I get ambitious, though unfortunately the situation where I ran into
> this
> problem involved a huge proprietary source file.)