Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Paul Pluzhnikov" <ppluzhnikov@google.com>
To: "gdb Mailing List" <gdb@sources.redhat.com>
Cc: "Stefano Sabatini" <stefano.sabatini-lala@poste.it>
Subject: Re: C++ debugging pain
Date: Wed, 27 Aug 2008 16:47:00 -0000	[thread overview]
Message-ID: <8ac60eac0808260936p247e0b92k38384ea54edbaa51@mail.gmail.com> (raw)
In-Reply-To: <20080826162251.GA24398@geppetto>

On Tue, Aug 26, 2008 at 9:22 AM, Stefano Sabatini
<stefano.sabatini-lala@poste.it> wrote:

> * "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:

  print p.virtfn()

Instead, try:

  print p->virtfn()

(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.

Cheers,
-- 
Paul Pluzhnikov


  reply	other threads:[~2008-08-26 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 16:04 Stefano Sabatini
2008-08-27 16:47 ` Paul Pluzhnikov [this message]
2008-08-27 22:46   ` Stefano Sabatini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ac60eac0808260936p247e0b92k38384ea54edbaa51@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=gdb@sources.redhat.com \
    --cc=stefano.sabatini-lala@poste.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox