This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: dwarflint versus linkage_name attributes
- From: Dodji Seketeli <dodji at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 04 Apr 2011 22:30:34 +0200
- Subject: Re: dwarflint versus linkage_name attributes
Roland McGrath <roland@hack.frob.com> writes:
>> Yes. And more importantly because the name of the constructor of the
>> anonymous struct is the name of the naming typedef. [I now believe this
>> is a bug, though.]
>
> That can only be a default constructor, right?
Right.
> There is no way a user could write a constructor for an anonymous
> class/struct.
Indeed.
>> So this was breaking GDB because it wouldn't figure easily the
>> relationship between the constructor (which name is, e.g, 't') and the
>> anonymous struct which name is, well, anonymous. So adding the linkage
>> name attribute [which value is 't'] was the easier way [from GDB's
>> standpoint] to help fix the issue.
>
> This is so that GDB can figure out how to call the constructor to evaluate
> an expression that constructs an object of this type by performing an
> inferior call?
That [though I am not sure if GDB supports the evaluation of "new t"
yet], or "break t::t".
But even without going that far, GDB was crashing while reading the
symbol table because it was confused by seeing a typedef (named 't')
which underlying type was anonymous, with a constructor named 't'.
--
Dodji