Re: Strange warning - can't find linker symbol for virtual table
Re: Strange warning - can't find linker symbol for virtual table
- Subject: Re: Strange warning - can't find linker symbol for virtual table
- From: Jim Ingham <email@hidden>
- Date: Mon, 29 Nov 2010 11:39:15 -0800
This is gdb looking for the dynamic type of some C++ object. It does that by finding the vtable pointer in the object, since the demangled name of the vtable symbol that this points to is of the form "vtable for FULL_CLASS_NAME". In your case, we think we've found the vtable pointer in the object, but the symbol that it points to is not right, it is pointing to the Init function instead.
One possibility is that we are looking at an object pointer that hasn't been initialized yet. If you're unlucky that will point to something that looks enough like a real object for us to get this far, but of course isn't right yet... For instance if you do:
MyClass *my_class_ptr;
// Some other code here.
my_class_ptr = new MyClass();
and stop before my_class_ptr is newed up.
Otherwise maybe there's something extra about class XXX that is confusing us? Does it happen for all classes or only some classes?
Jim
On Nov 29, 2010, at 11:10 AM, Eric Gorr wrote:
> I am running my application with the debugger and stop at a breakpoint. At that point, I see this warning in the console repeated several times:
>
> warning: can't find linker symbol for virtual table for `xxx' value
> warning: found `xxx::Init(unsigned long)' instead
>
> As near as I can tell, it is a warning generated by GDB and probably not something I need to worry about.
>
> However, it is greatly impeding my ability to debug as I do output important stuff at times and these warnings are filling up my console. So, I would like to learn more about what they mean and what I can do about them.
>
> I have tried to reproduce this problem in a simple application, but have not been able to yet.
>
> If you have seen this warning or know anything about it, I would be interested.
>
>
> Thank you.
>
>
> _______________________________________________
> 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
_______________________________________________
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