public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "andre.poenitz at digia dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug c++/15008] New: Lookup of base types with virtual functions is broken Date: Thu, 10 Jan 2013 13:20:00 -0000 [thread overview] Message-ID: <bug-15008-4717@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=15008 Bug #: 15008 Summary: Lookup of base types with virtual functions is broken Product: gdb Version: 7.5 Status: NEW Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned@sourceware.org ReportedBy: andre.poenitz@digia.com Classification: Unclassified In the following code I would expect 'ptype A' to find A, no matter whether foo is declared virtual or not" struct A { }; struct B : A { }; struct C : B { virtual void foo() { } }; struct D : C { void foo() { // Break here. // (gdb) ptype A // -> Type D has no component named A. A *b = 0; } void bar() { // Break here. // (gdb) ptype A // -> Type D has no component named A. A *b = 0; } }; int main() { // Break here. // (gdb) ptype A // -> type = struct A { ... } D d; d.foo(); d.bar(); } // Note: If the 'virtual' is removed from C::foo(), // ptype A works in both D::foo() and D::bar() -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2013-01-10 13:20 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-10 13:20 andre.poenitz at digia dot com [this message] 2013-01-10 14:52 ` [Bug c++/15008] " tromey at redhat dot com 2013-10-31 19:40 ` tromey at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-15008-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).