This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/16050] New: Provide a standard way to register pretty printers by class name
- From: "b.r.longbons at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 14 Oct 2013 21:53:35 +0000
- Subject: [Bug python/16050] New: Provide a standard way to register pretty printers by class name
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16050
Bug ID: 16050
Summary: Provide a standard way to register pretty printers by
class name
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: b.r.longbons at gmail dot com
Currently pretty printers are looked up by iterating over
objfile.pretty_printers and calling the function objects until one.
In the vast majority of cases, the user really wants is to just look up the
printer based on the current type's name.
I propose that each objfile have an attribute fast_pretty_printers, and that
the first entry in the existing pretty_printers list be a printer that tries
the fast_pretty_printers. I am ignoring the global printer list because you
really shouldn't use it.
The actual printer could be written entirely in python, but Objfile needs to
add the attribute.
fast_pretty_printers would be a dict from the current type's name after
following typedefs and cutting off all template arguments, to a python function
(usually a class) that takes a gdb.Value as its argument.
--
You are receiving this mail because:
You are on the CC list for the bug.