This is the mail archive of the gdb@sources.redhat.com 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: constructors and DW_AT_MIPS_linkage_name


On Fri, Feb 13, 2004 at 09:59:30AM -0800, David Carlton wrote:
> I was just looking at the .debug_info for the example given in PR
> 1553, and I was surprised to see the following (some bits have been
> deleted)

> The weird thing is that operator= gets a linkage name, but the
> constructors don't.  I don't think we're prepared to deal with this;
> it would explain some weirdnesses that I've seen elsewhere, where
> trying to look up a class returns that class's constructor instead.
> 
> Is this a known GCC issue?  (The above is with GCC 3.2; for GCC
> mainline, the debug info for A isn't there at all, but that's a
> separate issue.)  If so, in what circumstances does it occur?

Hi David,

You have rediscovered the cloned constructors "bug".  The constructor
referenced in the debug information actually is an abstract instance,
and the two concrete instances reference that die via
DW_AT_abstract_origin.  Any cloned constructor or destructor will show
this behavior.

The finding-constructors-instead-of-classes thing is actually only
tangentially related.  At least, the last time I ran into it, it was. 
We do not walk the DW_AT_abstract_origin, or have a mangled name, so we
assume it's a toplevel function named Classname.  I thought this no
longer happened...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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