From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3896 invoked by alias); 10 Jan 2013 13:20:13 -0000 Received: (qmail 3799 invoked by uid 48); 10 Jan 2013 13:20:11 -0000 From: "andre.poenitz at digia dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andre.poenitz at digia dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00039.txt.bz2 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.