dwarflint versus linkage_name attributes

Dodji Seketeli dodji at redhat.com
Mon Apr 4 20:30:34 UTC 2011


Roland McGrath <roland at 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


More information about the elfutils-devel mailing list