This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/9170] Unable to locate constructors with forward-declared classes
- From: "thor at math dot tu-berlin dot de" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 16 Feb 2010 23:43:59 -0000
- Subject: [Bug c++/9170] Unable to locate constructors with forward-declared classes
- References: <20060107214801.9170.thor@math.tu-berlin.de>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From thor at math dot tu-berlin dot de 2010-02-16 23:43 -------
(In reply to comment #2)
> I tried to reproduce this but couldn't.
> I tried compiling two files like so:
>
> == main.cc
> class K;
>
> extern K *getk();
>
> int main () {
> K* k = getk();
>
> return 0;
> }
>
> == k.ccclass K {
> public:
> K ();
>
> int z;
> };
>
> K::K () {
> z = 25;
> }
>
> K *getk() {
> return new K;
> }
>
>
> I figured this was most likely to get the forward declaration read in
> first.
>
> On trunk I get weird behavior, e.g., "break K::K" does nothing at all.
> This doesn't sound like your bug, though. Maybe the crash has been fixed.
>
> It would be most helpful if you had a simple way to reproduce this.
What you see here is indeed another bug related to constructors, however, one
that isn't fixed by the code above. With the present gdb, I cannot reproduce the
2006 bug anymore, but I can reproduce here (and on my own sources) that setting
a breakpoint in a constructor does not work, as you did above.
Suggestion: Close the old bug, open a new concerning setting breakpoints on
constructors.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=9170
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.