This is the mail archive of the
mailing list for the GDB project.
Re: C++ debugging pain
- From: "Paul Pluzhnikov" <ppluzhnikov at google dot com>
- To: "gdb Mailing List" <gdb at sources dot redhat dot com>
- Cc: "Stefano Sabatini" <stefano dot sabatini-lala at poste dot it>
- Date: Tue, 26 Aug 2008 09:36:35 -0700
- Subject: Re: C++ debugging pain
- References: <20080826162251.GA24398@geppetto>
On Tue, Aug 26, 2008 at 9:22 AM, Stefano Sabatini
> * "class X does not have any method named Y": this happens with
> virtual methods defined in a parent class rather than in the class
> of the instance debugged
Try "set print object on".
(I am working on a fix which would make that unnecessary).
> * "Cannot resolve method (null)X to any overloaded instance":
> this happen when I try to invoke a method on some object
This usually happens when you have a pointer to Foo, and do:
(I am also working on that fix).
> I've been already advised by Daniel Jacobowitz (thanks Daniel) that
> it could depend on the method invoked being inlined.
If you compiled without '-O*', no inlining should have happened.
If you do compile with '-g -O2', you are inflicting pain on yourself.