Mail Archives: djgpp/1998/04/30/23:16:32
Gavin Sinclair wrote:
>
> Hello there,
>
> Can anybody offer me some advice in using GDB to debug C++ programs?
> Using DOS/Win95 with DJGPP and GDB 4.16, I notice the following problems:
>
> - method names are not demangled.
For this problem, try "set print demangle".
> - cannot refer to class variables directly, must use this->foo
I've never had this problem as long as demangling was enabled.
> - can't find inline code
This is a well-known limitation of the COFF debugging format. The
recent updates of GNU tools to the 2.8.1 binutils and gcc 2.8.0 have
collectively enabled another format known as stabs that supposedly
helps. Use the -gstabs switch to enable this.
> I've pored through the documentation for GDB and it seems the problem lies
> with the executable file format. In UNIX at university, I use the same
> version of GDB and can debug C++ no problems. Is there anything I can do
> at home?
Unless somebody wants to go to the substantial effort of converting all
the DJGPP tools, as well as the real mode stub, to use a different
object format, users will have to live with this limitation. Sorry.
:-(
--
---------------------------------------------------------------------
| John M. Aldrich | "Animals can be driven crazy by pla- |
| aka Fighteer I | cing too many in too small a pen. |
| mailto:fighteer AT cs DOT com | Homo sapiens is the only animal that |
| http://www.cs.com/fighteer | voluntarily does this to himself." |
---------------------------------------------------------------------
- Raw text -