Re: Strange Instruction Pointers
Re: Strange Instruction Pointers
- Subject: Re: Strange Instruction Pointers
- From: Ricky Sharp <email@hidden>
- Date: Wed, 9 Jun 2004 22:50:03 -0500
On Jun 9, 2004, at 9:04 PM, Jim Ingham wrote:
What's going on is that the way gcc emits constructors for C++ objects
is slightly complicated. Sometimes, there are different constructors
depending on whether the object is "in-charge of constructing its
members" or "not in charge of constructing its members". This is
required if a class can be a virtual base class of a diamond diagram,
since then only one of the two "paths" should construct the members,
but the C++ Standard requires that both paths get called. However,
these constructors don't get called directly, there is a generic
constructor which just decides which of these to call.
So stepping into a new () involves stepping through this generic
constructor first, and the generic constructor has whacky line number
information because of the way the debug info gets laid out. Note
that gcc doesn't always make the whole variety of constructors, so
that's probably why you sometimes see one thing, and sometimes
another...
What really needs to happen is that gdb needs to be changed to
recognize the "generic" constructor as a trampoline - much like
objc_msgSend is for ObjC. We have a bug about this, but I haven't
gotten to it yet. It turns out to be a bit tricky to implement.
In the meantime, if you just keep on stepping you should end up in the
real constructor.
Thanks Jim. Glad it's not an issue on my part.
If it would help to file an additional bug on this, I can do that.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.