This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: breakpoints in constructors
>>>>> "Daniel" == Daniel Jacobowitz <drow at mvista dot com> writes:
Daniel> On Fri, Apr 18, 2003 at 01:04:46PM -0700, David Carlton
Daniel> wrote:
>> I might have some time over the next few weeks (/months) to work
>> on the "breakpoints in constructors" issue. Daniel: clearly
>> you've thought about this already, so if you happen to have time
>> to do a bit of a brain dump on the issue at some point, I'd
>> appreciate it.
Daniel> Sure. First of all, a rough overview of the problem; might
Daniel> as well keep everything in one place.
Daniel> With the new GCC 3.x multi-vendor C++ ABI, constructors are
Daniel> implemented as multiple functions: C1, the complete object
Daniel> constructor [in-charge] C2, the base object constructor
Daniel> [not-in-charge] C3, the allocating constructor [not currently
Daniel> used]
Daniel> Similarly for destructors - most of the rest of this message
Daniel> applies to destructors too. The base constructor is
Daniel> generally called for the base objects of a derived class,
Daniel> esp. with virtual inheritance; it's been a while since I
Daniel> looked at exactly when.
Daniel> GCC has chosen to implement this by duplicating the function,
Daniel> including any user-provided code and any compiler-added code.
Daniel> A better implementation would have one copy and labels for
Daniel> multiple entry points, on systems where that is supported;
Daniel> that's temporarily tabled pending a better description of the
Daniel> GCC tree structure to describe multiple entry points.
Maybe this is off base, but Fortran has always had multiple entry
points, and GCC supports Fortran (g77), so presumably there is a way
to represent this in the tree structure already.
paul