This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
- From: "pmuldoon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 26 Mar 2009 08:52:33 -0000
- Subject: [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
- Reply-to: sourceware-bugzilla at sourceware dot org
This is not so much a bug as a missing feature. Right now if there is a printer
for std::map, but you have the derived class:
Class Foo : public std::map
the printer will not pretty-print Foo. In this case Foo is just an uncomplicated
derived class of std::map. There is no reason why the std::map information in
that class cannot be pretty-printed.
Each python printer can special case this by searching for the base class
information in the fields attribute of the value. But this would require every
C++ Python printer to account for this.
After the initial Python value -> printer search and failure, GDB will fall-back
to its own internalised pretty-printer logic. There is another chance here to
attempt to inject Python pretty printers over GDB internalised pretty-printers.
As GDB strips away to the base-class, there is an opportunity to re-run the
printer search to check if there is a printer for that base class. We should add
logic to this code to rerun the search against the base-class, with the value
type being reported as the base class.
--
Summary: Modify Python value pretty-printers to search for a C++
base class printer, if a specialised one does not exist.
Product: gdb
Version: archer
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: pmuldoon at redhat dot com
ReportedBy: pmuldoon at redhat dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10008
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.