This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: dwarflint versus linkage_name attributes
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 04 Apr 2011 19:57:17 +0200
- Subject: Re: dwarflint versus linkage_name attributes
On Mon, 2011-04-04 at 10:46 -0700, Roland McGrath wrote:
> > See GCC PR 47510.
> >
> > Basically, this is a GCC extension. Partly it is there to make the
> > implementation in GDB simpler, but it is also a DWARF reflection of a
> > C++ feature that otherwise has no natural existing representation (at
> > least IMO).
>
> I read that PR and I see that Dodji's patch adds linkage_name to a type.
> But I don't see anything constituting an explanation of why that makes
> sense to do.
There is actually a comment in the source code:
/* This is a GNU Extension. We are adding a
DW_AT_linkage_name attribute to the DIE of the
anonymous struct TYPE. The value of that attribute
is the name of the typedef decl naming the anonymous
struct. This greatly eases the work of consumers of
this debug info. */
Although I admit to need to think a little harder to really understand
how this is really used. And example would help.
I like to make sure that we document these extensions in dwarflint as
clearly as possible.
Cheers,
Mark