Re: [RFA/stabs reader] Fix v3 duplicate constructors problem

Jason Merrill
2001-12-03T22:58:25Z

>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:

>> What does GDB actually use the member function information for? What
>> impact would this change have, other than the output of ptype?

> Right now, the big thing is probably member function calls. If the
> constructor is called from GDB, we want to get the complete object
> constructor. I'm not 100% sure this is even possible, though.

You can't call a constructor directly in C++; no reason to allow it from
GDB. Destructors are a different matter, though; an explicit call should
go to the non-deleting, in-charge version.

> I hadn't considered setting breakpoints on all of them. That's very
> difficult; suppose I look at an assembly listing for a constructor and
> tell it to break on a particular line. How can I figure out source
> line information for every constructor?

With Dwarf, all clones/inlines point to the abstract version; the internal
representation could keep track of all instances of a particular abstract
function.

> Perhaps it is best to continue emitting them and ignore them until we
> support them in GDB.

Seems reasonable.

Jason