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]

GDB C++ support


I talked to Eli Zeretzki about this recently, and he suggested to post this
on this list:

given the following source:

class A
 void f( ostream & o);

    A my_A;

i enter gdb and want to use b 'A::f', which doesn't work (just no symbol
info in demangled form for gdb available)

b 'main()' works ... strange enough. so classless names (which I assume are
not mangled/encoded in c style) are possible.
when I set the breakpoint via b gdbtest.cpp:24 it stops and shows the
appropriate line as:

Breakpoint 1, main () at gdbtest.cpp:31
31              A       m(5);
(gdb) c

Breakpoint 2, _ZN1A1fERSo (this=0x1f13fd8, o=@0x3b4c0) at gdbtest.cpp:24
24              o << i << endl;

(gdb) info stack
#0  _ZN1A1fERSo (this=0x1f13fd8, o=@0x3b4c0) at gdbtest.cp
#1  0x1e8c in main () at gdbtest.cpp:32
#2  0x5a82 in __crt1_startup ()
    at c:/djgpp/lang/cxx-v3/bits/locale_facets.tcc:75

this is for gcc 3.0.3, gdb 5.0 and compiled with -gstabs+, using djgpp 2.03

So my question would be, how far the work on support for C++ and gcc 3.x
went as of now, and if one could expect some solution to this problem in the
near future?

It just confuses me, that the development of gcc and gdb seems so
asynchronous, and a compiler suite, as elegant as it may be, withers away if
it lacks usable debugging support.

But I may be mistaken, and am just not able to find out the right -g<format>
specifier to achieve full symbolic debugging. In that case I'ld be thankful
for any guidance.

But I am thankful anyway for the mere existence of gcc and gdb nonetheless
:) and the works of all the ones involved.


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