This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
c++/1112: can't set breakpoint on destructor
- From: carlton at math dot stanford dot edu
- To: gdb-gnats at sources dot redhat dot com
- Date: 3 Mar 2003 22:10:30 -0000
- Subject: c++/1112: can't set breakpoint on destructor
- Reply-to: carlton at math dot stanford dot edu
>Number: 1112
>Category: c++
>Synopsis: can't set breakpoint on destructor
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 03 22:18:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: carlton at math dot stanford dot edu
>Release: GNU gdb 2003-03-03-cvs
>Organization:
>Environment:
i686-pc-linux-gnu (Red Hat 7.3), GCC 3.1, DWARF 2
>Description:
GDB won't let me set a breakpoint on a destructor, unless
I add parentheses.
>How-To-Repeat:
Compile this:
class C {
public:
~C() {}
};
int main()
{
C c;
}
Then:
jackfruit$ /extra/gdb/mirror/src/gdb/gdb a.out
GNU gdb 2003-03-03-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) b C::~C
the class `C' does not have destructor defined
Hint: try 'C::~C<TAB> or 'C::~C<ESC-?>
(Note leading single quote.)
(gdb) b C::~C()
Breakpoint 1 at 0x8048515: file foo.cc, line 3.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: