This is the mail archive of the gdb@sources.redhat.com 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]

Re: I can't stand it any more.




On Sat, 27 Jan 2001, David Dill wrote:

>
> Hasn't anyone noticed that GDB 5.0 doesn't work worth a damn with g++
> in a generic redhat linux development environment?

Define generic redhat linux development environment.

>
> I filed a bug months ago point out that calling "cout << 1" from gdb
> 5.0 fails with gcc 2.95.1.
Really?
No it doesn't.

Script started on Sat Jan 27 21:51:37 2001
dberlin@dynamic-addr-83-177:~ > gdb-5.0 ./a.out
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-suse-linux"...
(gdb) b main
Breakpoint 1 at 0x1800688: file temp.cc, line 4.
(gdb) r
Starting program: /home/dberlin/./a.out

Breakpoint 1, main () at temp.cc:4
4	cout <<1<<endl;
(gdb) l
1	#include <iostream.h>
2	int main(void)
3	{
4	cout <<1<<endl;
5	}
6
(gdb) p cout << 1
$1 = (ostream &) @0x1810920: {<ios> = {<_ios_fields> = {_strbuf = 0x17dea78,
      _tie = 0x0, _width = 0, _flags = 17, _fill = 32, _state = 0 '\000',
      _exceptions = 0 '\000', _precision = 6, _arrays = 0x0},
    _vptr.ios = 0x0}, _vb.3ios = 0x1810924}
(gdb) p endl(cout)
1
$2 = (ostream &) @0x1810920: {<ios> = {<_ios_fields> = {_strbuf = 0x17dea78,
      _tie = 0x0, _width = 0, _flags = 17, _fill = 32, _state = 0 '\000',
      _exceptions = 0 '\000', _precision = 6, _arrays = 0x0},
    _vptr.ios = 0x0}, _vb.ios = 0x1810924}
(gdb) q
The program is running.  Exit anyway? (y or n) y
dberlin@dynamic-addr-83-177:~ > exit
exit

Script done on Sat Jan 27 21:52:05 2001


Looks good to me.


(I only put the code in the file to make sure it got output in the
executable)

Oh wait, you must be using stabs.
Let me guess
you get:
Breakpoint 1, main () at temp.cc:4
4       cout <<1<<endl;
(gdb) p cout << 1
Structure has no component named operator<<.

Right?

Use dwarf2 (add -gdwarf-2 to your compiler command lines).
Stabs is useless for doing real C++ debugging.

> That, and the 13 other bugs in the bug
> database, are all unassigned.

Why are you emailing gdb@sources about redhat gdb bugs?

>
> The current crappy development environment must be very harmful for
> the cause of those trying to develop free software for linux.  I know
> it's holding us back.

While I appreciate the compliment on th quality, please realise i'm
working on C++ support in gdb as fast as i can. Before I became
maintainer, most of the code hadn't been touched since g++ support was
first integrated into gdb (g++ 2.5.8 or something like that).

 HTH,
 Dan
>
> 	David Dill
>


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