Bug 8166 - weird menu choices when setting constructor breakpoints
Summary: weird menu choices when setting constructor breakpoints
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: 7.2
Assignee: Not yet assigned to anyone
: 9032 (view as bug list)
Depends on:
Blocks: 11211
  Show dependency treegraph
Reported: 2003-02-15 00:38 UTC by David Carlton
Modified: 2010-03-13 00:45 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description David Carlton 2003-02-15 00:38:00 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 {
  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
> 0

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.

GNU gdb 2003-02-14-cvs

Red Hat 7.3, GCC 3.1, DWARF-2
Comment 1 Keith Seitz 2010-03-12 19:11:08 UTC
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.
Comment 2 Keith Seitz 2010-03-13 00:45:41 UTC
*** Bug 9032 has been marked as a duplicate of this bug. ***