This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: c++/1023: setting a breakpoint on C++ member functions
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 3 Feb 2003 15:28:00 -0000
- Subject: Re: c++/1023: setting a breakpoint on C++ member functions
- Reply-to: Michael Elizabeth Chastain <mec at shout dot net>
The following reply was made to PR c++/1023; it has been noted by GNATS.
From: Michael Elizabeth Chastain <mec@shout.net>
To: zeitler@lucent.com
Cc: gdb-gnats@sources.redhat.com
Subject: Re: c++/1023: setting a breakpoint on C++ member functions
Date: Mon, 3 Feb 2003 09:18:49 -0600
I see this bug in my test bed as well.
I confirmed this with:
target=native, host=i686-pc-linux-gnu, osversion=red-hat-8.0,
gdb={5.3, HEAD%20030201}, gcc=2.95.3, binutils=2.13.2.1,
libc=2.2.93-5-rh, gformat=stabs+
The problem happens with both gdb 5.3 and gdb HEAD%20030201.
The problem happens with stabs+. It does not happen with dwarf-2.
Workaround: try compiling with -gdwarf-2.
Michael C
Script started on Mon Feb 3 10:05:22 2003
[mgnu@berman pr-1023]$ cat myclass.cc
class myClass
{
public:
myClass() {};
~myClass() {};
void performUnblocking( short int cell_index );
void performBlocking( int cell_index );
};
void myClass::performUnblocking( short int cell_index ) {}
void myClass::performBlocking( int cell_index ) {}
int main ()
{
myClass mc;
mc.performBlocking (0);
mc.performUnblocking (0);
}
# gdb 5.3, gcc 2.95.3, -gstabs+
[mgnu@berman pr-1023]$ /berman/migchain/install/target/native/gdb-5.3/bin/gdb mycclass.2953.2132.stabs+.exe
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) break myClass::performBlocking
the class myClass does not have any method named performBlocking
Hint: try 'myClass::performBlocking<TAB> or 'myClass::performBlocking<ESC-?>
(Note leading single quote.)
(gdb) break myClass::performUnblocking
Breakpoint 1 at 0x80491b0: file myclass.cc, line 10.
(gdb) quit
# gdb HEAD%20030201, gcc 2.95.3, -gstabs+
[mgnu@berman pr-1023]$ /berman/fsf/_today_/berman/install/target/native/gdb/HEAD/bin/gdb myclass.2953.2132.stabs+.exe
GNU gdb 2003-02-01-cvs
Copyright 2003 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 "i686-pc-linux-gnu"...
(gdb) break myClass::performBlocking
the class myClass does not have any method named performBlocking
Hint: try 'myClass::performBlocking<TAB> or 'myClass::performBlocking<ESC-?>
(Note leading single quote.)
(gdb) break myClass::performUnblocking
Breakpoint 1 at 0x80491b0: file myclass.cc, line 10.
(gdb) quit
# gdb 5.3, gcc 2.95.3, -gdwarf-2
[mgnu@berman pr-1023]$ /berman/fsf/_today_/berman/install/target/native/gdb/HEAD//bin/gdb myclass.2953.2132.stabs+.migchain/install/target/native/gdb-5.3/bin/gdb myclass.2953.2132.dwarf-2.exe
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) break myClass::performBlocking
Breakpoint 1 at 0x80491b7: file myclass.cc, line 12.
(gdb) break myClass::performUnblocking
Breakpoint 2 at 0x80491a6: file myclass.cc, line 10.
(gdb) quit
# gdb HEAD%20030201, gcc 2.95.3, -gdwarf-2
[mgnu@berman pr-1023]$ /berman/fsf/_today_/berman/install/target/native/gdb/HEAD/bin/gdb myclass.2953.2132.dwarf-2.exe
GNU gdb 2003-02-01-cvs
Copyright 2003 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 "i686-pc-linux-gnu"...
(gdb) break myClass::performBlocking
Breakpoint 1 at 0x80491b7: file myclass.cc, line 12.
(gdb) break myClass::performUnblocking
Breakpoint 2 at 0x80491a6: file myclass.cc, line 10.
(gdb) quit
[mgnu@berman pr-1023]$ exit
Script done on Mon Feb 3 10:08:46 2003