More Debugging Problems
More Debugging Problems
- Subject: More Debugging Problems
- From: Andreas Grosam <email@hidden>
- Date: Mon, 15 Aug 2005 15:02:04 +0200
With the new ABI, the conforming C++ compilers - including apple gcc-4
- generate up to three versions of the same constructor and destructor.
Means, for instance the c-tor Foo::Foo() may have up to three
incarnations, but each which its unique mangled name and each which its
own code:
_ZN3FooC1Ev,
_ZN3FooC2Ev,
_ZN3FooC3Ev
Namely, the different c-tors are
C1: complete object constructor
C2: base object constructor
C3: complete object allocating constructor
For the destructor of a class, this is
D0: deleting destructor
D1: complete object destructor
D2: base object destructor
respectively.
For more information why three versions of all c-tors and the d-tor for
a class are required see
<http://www.codesourcery.com/cxx-abi/abi.html>
The problem with gdb is now, that when setting a breakpoint in a c-tor
or d-tor via specifying the source line (using the gutter), gdb (and
XCode, too) does not take care of the possible three different
versions. Instead, it sets only _one_ breakpoint in one of the possible
three versions.
Sure, if you expect to break in a c-tor, it actually might not because
it is simply set in a different version. So you might never break in
your c-tor or dtor, depending which version has been selected from gdb
and which version is called from the current code path.
This problem is known since about at least 3 years - with the invent of
the new ABI (gcc-3).
I would like to know if Apple already addressed this problem. There are
only a few patches for gdb around which do not 100% solve the problem.
It seems - in particular in conjuction with templates, a major change
in gdb is required.
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden