Sources Bugzilla – Bug 8166
weird menu choices when setting constructor breakpoints
Last modified: 2010-03-13 00:45:41 UTC
[Converted from Gnats 1061] When I try to set a breakpoint on a constructor, I get bizarre menu choices in some circumstances: if I compile the following: class C { public: C() {}; }; int main() { } then the following happens: jackfruit$ /extra/gdb/mirror/src/gdb/gdb a.out GNU gdb 2003-02-14-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 [0] cancel [1] all ?HERE ?HERE > 0 canceled If I actually declare a variable of type c somewhere, the ?HERE's get replaced by something more reasonable. It's not entirely clear to me _exactly_ what the conditions are to trigger the bug. Release: GNU gdb 2003-02-14-cvs Environment: Red Hat 7.3, GCC 3.1, DWARF-2
I verified this bug using DWARF-2 with GCC 3.4.6 and GDB 6.8 and 7.1. [Note that using -gstabs+ does not exhibit the problem.] Recent patches have been committed which fixes this. If this is still a problem, please re-open this bug or submit a new one.
*** Bug 9032 has been marked as a duplicate of this bug. ***