This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- From: Michael Matz <matz at suse dot de>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Richard Guenther <rguenther at suse dot de>, Gabriel Dos Reis <gdr at cs dot tamu dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Feb 2007 17:04:49 +0100 (CET)
- Subject: Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- References: <20061211155733.GA2660@nevyn.them.org> <Pine.LNX.4.64.0612111658590.29962@wotan.suse.de> <20061211174548.GA7094@nevyn.them.org> <Pine.LNX.4.64.0612121519200.29962@wotan.suse.de> <20061212150652.GA18750@nevyn.them.org> <Pine.LNX.4.64.0612121723070.29962@wotan.suse.de> <457EF130.5040902@codesourcery.com> <Pine.LNX.4.64.0612131535100.29962@wotan.suse.de> <4580405A.4000109@codesourcery.com> <Pine.LNX.4.64.0702201500170.25448@wotan.suse.de> <20070220143731.GA8544@caradoc.them.org>
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.