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: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>, Michael Matz <matz at suse dot de>, Richard Guenther <rguenther at suse dot de>, Jason Merrill <jason at redhat dot com>, Gabriel Dos Reis <gdr at cs dot tamu dot edu>, Nathan Sidwell <nathan at codesourcery dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, mrs at apple dot com, Paolo Carlini <pcarlini at suse dot de>
- Date: Mon, 11 Dec 2006 15:56:53 -0800
- Subject: Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- References: <457D726E.7060905@redhat.com> <Pine.LNX.4.64.0612111628100.3105@zhemvz.fhfr.qr> <Pine.GSO.4.58.0612110926270.19022@sun> <Pine.LNX.4.64.0612111635030.3105@zhemvz.fhfr.qr> <457D7AB1.10706@redhat.com> <Pine.LNX.4.64.0612111647520.3105@zhemvz.fhfr.qr> <20061211155733.GA2660@nevyn.them.org> <Pine.LNX.4.64.0612111658590.29962@wotan.suse.de> <20061211174548.GA7094@nevyn.them.org> <84fc9c000612111229n5aae6c43g19309d5419f7a7ea@mail.gmail.com> <20061211205823.GA13198@nevyn.them.org>
Daniel Jacobowitz wrote:
> ARM RVCT on the other hand only produces the short names but lists
> template parameters:
>
> <1><5e>: Abbrev Number: 5 (DW_TAG_class_type)
> DW_AT_sibling : <a6>
> DW_AT_name : X
> DW_AT_byte_size : 4
> <2><64>: Abbrev Number: 130 (DW_TAG_template_type_param)
> DW_AT_type : DW_FORM_ref1 <9e>
> <2><9e>: Abbrev Number: 4 (DW_TAG_base_type)
> DW_AT_byte_size : 4
> DW_AT_encoding : 5 (signed)
> DW_AT_name : int
Personally, I think this is the best debug information -- and certainly
cheapest to produce. It makes more work for the debugger (formatting
the template parameters), but seems like a more sensible representation
to me.
Well-written 3rd-party debuggers will, at worst, ignore the template
information and print the basic name of the type. That's a regression
for their users -- but, hey, people should use GDB. :-) I think having
3rd-party debuggers displaying mangled names would be Just Wrong, but, I
don't think the template name without parameters is wrong -- it's just
incomplete.
> I guess we could switch from the first form to the second form, if
> someone added GDB support for DW_TAG_template_type_param and
> DW_TAG_template_value_param. GDB could handle both cases, because
> a valid DW_AT_name in C++ would never have '<' in it if there
> were explicit params. What do you think?
Yes, that's correct.
> Anyway, if that's more than you want to bite off right now, I think
> we need to hold on to what we have now.
Indeed. People might also want to wait until GDB with support for the
more compact format has been out for a while before we switch the
compiler, though, personally, I'd be OK with switching the compiler as
soon as CVS GDB had support for the compact format.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
- References:
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory