[PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
Michael Matz
matz@suse.de
Tue Feb 20 17:34:00 GMT 2007
Hi,
On Tue, 20 Feb 2007, Daniel Jacobowitz wrote:
> On Tue, Feb 20, 2007 at 03:24:20PM +0100, Michael Matz wrote:
> > - .string "_Ios_Openmode"
> > + .string "std::_Ios_Openmode"
> > - .string "new_allocator<char>"
> > + .string "__gnu_cxx::new_allocator<char>"
>
> These are more incorrect than the current names. They're inside a
> DW_TAG_namespace scope, so GDB goes to a lot of trouble to prepend the
> namespace to the specified name. It'll get std::std::_Ios_Openmode
> and I think that's the right interpretation of this debug info.
Hmpf.
> Is there some way we can lose the initial scope?
That's better, but is it really correct? Think about a name like:
N1::TA<N1::A>
(the DIE being nested in the one for namespace N1). Current g++ would
emit the name "TA<N1::A>", and I guess gdb doesn't try to fiddle with the
template arguments itself, so that would work.
Hmm... I guess the diagnostic machinery could be persuaded to do that, but
I'm not sure how (Gaby, any advice?). Alternatively I could just reuse
the old code from mangle_class_name_for_template, which does that by hand,
not the nicest solution, though :-/
> > - .string "._16"
> > + .string "<anonymous struct>::<anonymous union>"
>
> (dunno about this one, maybe it shouldn't have a DW_AT_name at all?)
That's what the dwarf2out code is doing normally when a 0 pointer is
returned as name.
Ciao,
Michael.
More information about the Gcc-patches
mailing list