This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The future of dwarf2_physname


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

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

I think so.  In fact, I think it should be preferred.

My reasoning is that when DW_AT_linkage_name exists, it is definitive.
Our exposure here is to compiler bugs (which would be very bad ones --
but not our problem) and to demangler bugs -- something I am not
extremely concerned about.  And, we have seen bugs where the DWARF is
very incorrect but the linkage name is not (I think these have been
fixed, but the point is that they confound physname, and even reasonably
recent compilers, like the F13 gcc, still have this.)

However, it is also now clear to me that we do need physname.

First, there are cases where GCC does not emit DW_AT_linkage_name.  I
finally filed the one case we know about:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49047

Second, maybe DW_AT_linkage_name will be dropped in order to shrink
debuginfo.

Third, there are other compilers.

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

Based on Jan's response, and discussions we've had recently, it seems
that the regressions in question are really just differences between
physname and the demangler, correct?  And the problem specifically is
that template functions have the return type in the demangled form,
requiring users, for the time being, to add quotes?

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

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

Or (3) Apply both and make linkage_name the preferred choice.

At present this is what I think we should do.

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

I think for 7.3 we would accept that there are some regressions, and
then fix them for a future release.

I am partial to Jan's view that we should be using the full name of the
object, and then have symbol aliases or code in linespec to expand nice
shortcuts to the full name.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]