Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by Norbert Kiesel
Tue, 20 Feb 1990 15:54
gdb 3.5 can't find constructor/destructor of C++ classes
Author: Norbert Kiesel
Date: Tue, 20 Feb 1990 15:54
Date: Tue, 20 Feb 1990 15:54
93 lines
4652 bytes
4652 bytes
Hello,
I just found an error in gdb-3.5. If either the constructor or the
destuctor of a class misses, gdb can't find the other one, i.e.
``b <class>::<class>'' doesn't work. The problem is even worse: under
some circumstances, one "complete" (i.e. with explicit constructor or
destructor) class is sufficent for finding the constructor of an incomplete
class (i.e. only constructor). gdb prompts then with the normal 4 choices
(cancel, all, cons, dest) but the 3rd slot is only a ``2HERE?''.
It follows a small typescript documenting the first described behaviour.
Script started on Tue Feb 20 16:15:30 1990
[rwthi3,G++] cat xx.cc
class xx
{
public:
void x() {};
#ifdef GOOD
xx() {};
#endif
~xx() {};
};
main () {}
[rwthi3,G++] g++ -v -g -fno-inline xx.cc -o bad
g++ version 1.36.4 (based on GCC 1.36.93)
/global/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Dmc68020 xx.cc /usr/tmp/cca02082.cpp
GNU CPP version 1.37
/global/lib/gcc-cc1plus /usr/tmp/cca02082.cpp -quiet -dumpbase xx.cc -fno-inline -g -version -o /usr/tmp/cca02082.s
GNU C++ version 1.36.4 (based on GCC 1.36.93) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -mbitfield
/global/lib/gcc-as -mc68020 -o xx.o /usr/tmp/cca02082.s
/global/lib/gcc-ld -o bad -e start -dc -dp -Bstatic /lib/crt0.o /lib/Fcrt1.o xx.o -lg++ /global/lib/gcc-gnulib -lg -lc
[rwthi3,G++] g++ -v -g -fno-inline xx.cc -o good -DGOOD
g++ version 1.36.4 (based on GCC 1.36.93)
/global/lib/gcc-cpp -+ -v -DGOOD -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Dmc68020 xx.cc /usr/tmp/cca02087.cpp
GNU CPP version 1.37
/global/lib/gcc-cc1plus /usr/tmp/cca02087.cpp -quiet -dumpbase xx.cc -fno-inline -g -version -o /usr/tmp/cca02087.s
GNU C++ version 1.36.4 (based on GCC 1.36.93) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -mbitfield
/global/lib/gcc-as -mc68020 -o xx.o /usr/tmp/cca02087.s
/global/lib/gcc-ld -o good -e start -dc -dp -Bstatic /lib/crt0.o /lib/Fcrt1.o xx.o -lg++ /global/lib/gcc-gnulib -lg -lc
[rwthi3,G++] gdb good
GDB 3.5, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /home/private/staff/norbert/G++/good...done.
Type "help" for a list of commands.
(gdb) b xx::x
Reading in symbols for xx.cc...done.
Breakpoint 1 at 0x22e2: file xx.cc, line 4.
(gdb) b xx::xx
[0] cancel
[1] all
[2] file:xx.cc; line number:8
[3] file:xx.cc; line number:6
> 0
cancelled
(gdb) q
[rwthi3,G++] gdb bad
GDB 3.5, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /home/private/staff/norbert/G++/bad...done.
Type "help" for a list of commands.
(gdb) b xx::x
Reading in symbols for xx.cc...done.
Breakpoint 1 at 0x22d4: file xx.cc, line 4.
(gdb) b xx::xx
that class does not have any method named xx
(gdb) q
[rwthi3,G++] exit
script done on Tue Feb 20 16:17:27 1990
so long
Norbert
*******************************************************************************
* Norbert Kiesel NN NN KK KK *
* Institut fuer Informatik III NNN NN KK KK *
* RWTH Aachen NN N NN KK KK *
* NN N NN KKKK *
* Tel.: (0241) 80-7266 NN N NN KKKK *
* NN N NN KK KK *
* EUNET: norbert@rwthi3.uucp NN N NN KK KK *
* ...!mcvax!unido!rwthi3!norbert NN NNN KK KK *
*******************************************************************************
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads