This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/17436] New: better vtable inspection
- From: "tromey at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 26 Sep 2014 15:09:05 +0000
- Subject: [Bug c++/17436] New: better vtable inspection
- Auto-submitted: auto-generated
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 <Der::b1()>
[1]: 0x400816 <Der::b2()>
vtable for 'Base2' @ 0x400910 (subobject @ 0x602020):
[0]: 0x400820 <non-virtual thunk to Der::b2()>
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.