This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How to setup a breakpoint on constructor
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: jimb at redhat dot com, mec dot gnu at mindspring dot com
- Cc: drow at false dot org, eliz at gnu dot org, gdb at sources dot redhat dot com,rolandz at poczta dot fm
- Date: Fri, 16 Jul 2004 18:15:32 -0400 (EDT)
- Subject: Re: How to setup a breakpoint on constructor
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