Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
To: gdb Mailing List <gdb@sources.redhat.com>
Subject: C++ debugging pain
Date: Wed, 27 Aug 2008 16:04:00 -0000	[thread overview]
Message-ID: <20080826162251.GA24398@geppetto> (raw)

Hi all,

I'm writing here since google didn't help with the problems I'm
facing.

I'm currently writing a C++ app, and I'm using gdb to debug its code
(code compiled by gcc/g++), and facing many problems which make the use
of gdb quite problematic not to say frustrating sometimes.

Common problems which I'm faced are mainly:

* incomplete types problems when trying to print object with p.
  I today followed a tip and added -femit-class-debug-always and
  apparently I got that problem fixed.

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

* "Cannot resolve method (null)X to any overloaded instance":
  this happen when I try to invoke a method on some object

  I've been already advised by Daniel Jacobowitz (thanks Daniel) that
  it could depend on the method invoked being inlined.

I'll eventually try to provide test cases for each one of these
problems, for the moment I would just like to know if:

* these are common problems, or are just the way the universe is conjuring
  for telling me: "I don't like you" ;-)

* these are to be considered gcc/gdb bugs, or are simply unavoidable
  problems

* there is some magic incantation (e.g. gcc/gdb options) I could or should
  use in order to avoid them.

Many thanks in advance.

Regards.


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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 16:04 Stefano Sabatini [this message]
2008-08-27 16:47 ` Paul Pluzhnikov
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=20080826162251.GA24398@geppetto \
    --to=stefano.sabatini-lala@poste.it \
    --cc=gdb@sources.redhat.com \
    /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