Re: How to setup a breakpoint on constructor

Michael Elizabeth Chastain
2004-07-16T22:15:34Z

jimb> If I remember right, the use of separate complete and base
jimb> constructors is an ABI requirement; the compiler doesn't have the
jimb> option of just generating whatever code it likes.

The ABI does require separate names.

If I recall correctly, Apple implemented this by having separate names
for base ctor and complete ctor (as required by the ABI) and then having
them call a unified constructor.

Gcc optimization can reduce calls from {base,complete}-ctor to
unified-ctor, from call instructions to jump instructions.

Then the debugger just puts ctor breakpoints on the
unified-ctor.

http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00354.html

Apple folks, have I got that right?

Michael C