[C++-sig] trouble with virtual methods

Hugo van der Merwe s13361562 at bach.sun.ac.za
Thu Jan 31 12:12:49 CET 2002


> I have given up on reading debugger manuals because we have too many
> platforms. Here is my secret weapon for debugging extensions:
> 
> #include <iostream>
> #define CheckPoint std::cout << __FILE__ << "(" << __LINE__ << ")" << std::endl
> 
> << std::flush
> 
> Keep inserting
> 
> CheckPoint;
> 
> in your code to narrow down the problem.
> 
> Ralf

Thanks, that will work fine for extension debugging itself, I need to
debug what Boost is doing though: the python print command gets
executed, the C++ function I'm calling is not getting executed: I have
thus narrowed it down to Boost (possibly my fault for using it
incorrectly, who knows, that's what I want to find out), and I've not
the knowledge of Boost to want to fill it with checkpoints.

I'll follow Dave's advice, thanks. I assume all I need is to use the
debug build of boost binaries - and probably a debug version of Python
executable too. (gdb should then give me the right line numbers and
filenames.)

Will let you know what my results are, thanks.
Hugo




More information about the Cplusplus-sig mailing list