This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ debugging pain

Hi all,

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

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

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

Many thanks in advance.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]