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: Mark Mitchell <mark at codesourcery dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, 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>, Richard Guenther <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org, mrs at apple dot com, Paolo Carlini <pcarlini at suse dot de>
- Date: Wed, 13 Dec 2006 19:30:25 +0100 (CET)
- 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> <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>
Hi,
On Wed, 13 Dec 2006, Mark Mitchell wrote:
> For big C++ programs, no amount of eliding default arguments is going to
> get you nice compact type names.
It really depends. For instance STL (and may others) are full of
many default arguments in the various classes, which aren't really
intersting most of the time, e.g. std::string (here the reduction to the
typedef'd name would already be enough, but also non-printing of default
args would help).
> That's why C++ programs are full of
> "typedef typename X::Y Z" stuff. I think that what you really want to
> ...
> The key point, echoing what you and Daniel have been saying, is that you
> need to be able to leverage the typedefs the programmer already has.
Yes.
> Breakpoints are easier than printing the types of things, since you can
> accept multiple names for the same function as breakpoints, but when
> printing a type who have to pick one way of printing it. No
> type-printing heuristic is ever going to be perfect.
Sure, but some are betters than others in most cases :)
> > debugger who looks at the current DW_AT_name for them). Ask Richard
> > about debugging tramp3D with gdb. It's basically a joke.
>
> We know a fair amount about debugging big C++ programs. Remember who
> lead POOMA development for several years? :-)
He :)
> Nobody is arguing that DW_AT_name should be the huge string for the long
> term. However, I would argue that it should stay that huge string until
> we add the template arguments to debug info, and until GDB understands
> that information.
Hmm. Okay, let's agree to disagree then :)
> I would consider dropping default arguments. But, mangled names are not
> in the spirit of DWARF, and dropping the template argument information
> completely is taking away critical information.
Okay, I can agree to this though. Dropping default args would already be
nice.
Ciao,
Michael.
- 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
- 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