From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2206 invoked by alias); 26 Sep 2014 15:09:08 -0000 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 Received: (qmail 2170 invoked by uid 48); 26 Sep 2014 15:09:07 -0000 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug c++/17436] New: better vtable inspection Date: Fri, 26 Sep 2014 15:09: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-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00737.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17436 Bug ID: 17436 Summary: better vtable inspection Product: gdb Version: unknown Status: NEW Severity: enhancement Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org I was recently debugging some C++ code and wanted to know where in the class hierarchy a given virtual function was first introduced. It would be nice if gdb had a way to give me this information. Perhaps something like a "verbose" flag to "info vtbl", telling gdb to print more information about the vtable layout. Consider the example from bug 17435. Here the full dump looks like: (gdb) info vtbl (Der *) b1 vtable for 'Der' @ 0x4008f0 (subobject @ 0x602010): [0]: 0x40080c [1]: 0x400816 vtable for 'Base2' @ 0x400910 (subobject @ 0x602020): [0]: 0x400820 You can't tell from this, but "Der::b1" is an override of a method from a class Base1. This obscured because the first vtable is printed in its entirety, without a marker indicating the end of the contributions of the various base classes. -- You are receiving this mail because: You are on the CC list for the bug.