Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* The future of dwarf2_physname
@ 2011-05-18 22:35 Keith Seitz
  2011-05-19 19:23 ` Jan Kratochvil
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Keith Seitz @ 2011-05-18 22:35 UTC (permalink / raw)
  To: gdb-patches

Hi,

Several of us Red Hat folk have been discussing this internally, and 
it's time to take this discussion public.

Jan's recent patch proposal in response to my typedef'd method 
parameters patchset lead to some further investigation, and I believe I 
(we?) are all coming to the conclusion that Jan's patch is probably the 
best way to proceed for the future, i.e., post 7.3 release.

[Jan's proposal is here: 
http://sourceware.org/ml/gdb-patches/2011-05/msg00358.html . NOTE: 
DMGL_VERBOSE should be added to the demangler options in that patch if 
you want to play with it.]

In short, if gdb uses DW_AT[_MIPS]_linkage_name when available, we can 
bypass constructing the physname *and* canonicalization, so gdb would 
only have to do this when DW_AT[_MIPS]_linkage_name is missing. Today 
this only happens AFAIK with gcc and ctors. I don't know about other 
compilers.

This could be a sizable performance win (not yet tested or quantified). 
While it does introduce some regressions, many are compiler problems and 
some are template problems (the linkage name contains the return type, 
and 1) gdb isn't equipped to deal with that; 2) it makes for a horrible 
user experience having to specify it all the time). There might be 
others, I have only delved into this a bit myself today.

So the first question to be asked here is, Should we adopt Jan's patch, 
or some variation of it, to use DW_AT_linkage_name when available?

The only hesitation I have is the compiler issues. Just using 
DW_AT_linkage_name instead of computing it has lead to many test 
regressions with differing compiler versions. [Again, I have only tested 
gcc.]

It appears that computing the physname offers gdb some buffer from 
compiler changes/bugs. At least with gcc. [in case I haven't stressed 
that enough]

What do others think?

------

The bigger issue is what to do for 7.3, which has been in limbo for 
quite some time awaiting resolution of c++/12506 (for which I have 
posted patches).

I guess there are basically two options:
1) Keep physname & apply the 12266/12506 patchset (when approved)
2) Adopt Jan's patch and fix the fallout now

My take on this today is that I think the least risky/most timely 
solution is #1. Gdb has been used with the dwarf2_physname patchset for 
over a year now, and it is not altogether broken. We are seeing some 
regressions from previous releases (none of these are in the test 
suite), and I have been trying to keep on top of them.

The 12266/12506 patchset is almost orthogonal to this decision. It fixes 
several additional typedef-related problems. 12506 is fixed by using 
DW_AT_linkage_name, but 12266 is not.

My big fear with #2 is "fixing" linespecs (yet again). Any changes to 
this area take an unimaginably large amount of time and effort.

What do others think?

Keith


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2011-06-02 19:03 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 22:35 The future of dwarf2_physname Keith Seitz
2011-05-19 19:23 ` Jan Kratochvil
2011-05-20 19:53   ` Keith Seitz
2011-05-20 20:38     ` Jan Kratochvil
2011-05-20 20:39     ` Tom Tromey
2011-05-21 20:37       ` Daniel Jacobowitz
2011-05-19 21:00 ` Daniel Jacobowitz
2011-05-20 19:26   ` Tom Tromey
2011-05-21 20:34     ` Daniel Jacobowitz
2011-05-20 19:10 ` Tom Tromey
2011-05-23 13:17 ` Jan Kratochvil
2011-05-23 19:52   ` Tom Tromey
2011-05-23 19:57     ` Keith Seitz
2011-05-24 21:12   ` [rfc 1/2] libiberty/ options code reshuffle [Re: The future of dwarf2_physname] Jan Kratochvil
2011-06-02 15:36     ` obsolete: " Jan Kratochvil
2011-05-24 21:21   ` [rfc 2/2] Follow DW_AT_linkage_name for methods " Jan Kratochvil
2011-05-25 19:40     ` Keith Seitz
2011-05-25 20:42       ` Tom Tromey
2011-05-25 20:40     ` Tom Tromey
2011-06-01 18:35       ` Keith Seitz
2011-06-02 16:26         ` Jan Kratochvil
2011-06-02 18:20           ` Tom Tromey
2011-06-02 18:28             ` Jan Kratochvil
2011-06-02 19:03     ` obsolete: " Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox