public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/10008] Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
2009-03-26 8:52 [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist pmuldoon at redhat dot com
@ 2009-03-26 8:52 ` pmuldoon at redhat dot com
2009-03-26 8:54 ` pmuldoon at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2009-03-26 8:52 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
@ 2009-03-26 8:52 pmuldoon at redhat dot com
2009-03-26 8:52 ` [Bug c++/10008] " pmuldoon at redhat dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2009-03-26 8:52 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/10008] Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
2009-03-26 8:52 [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist pmuldoon at redhat dot com
2009-03-26 8:52 ` [Bug c++/10008] " pmuldoon at redhat dot com
@ 2009-03-26 8:54 ` pmuldoon at redhat dot com
2009-04-02 20:10 ` pmuldoon at redhat dot com
2009-04-02 20:11 ` pmuldoon at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2009-03-26 8:54 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pmuldoon at redhat dot com 2009-03-26 08:54 -------
Created an attachment (id=3847)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3847&action=view)
Example Code to illustrate issue
Right now the derived class will not be pretty-printed by the C++ Python
pretty-printers. The object of this bug is to ensure that is should.
--
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/10008] Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
2009-03-26 8:52 [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist pmuldoon at redhat dot com
2009-03-26 8:52 ` [Bug c++/10008] " pmuldoon at redhat dot com
2009-03-26 8:54 ` pmuldoon at redhat dot com
@ 2009-04-02 20:10 ` pmuldoon at redhat dot com
2009-04-02 20:11 ` pmuldoon at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2009-04-02 20:10 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pmuldoon at redhat dot com 2009-04-02 20:10 -------
Created an attachment (id=3866)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3866&action=view)
Proposed solution
--
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/10008] Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist.
2009-03-26 8:52 [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist pmuldoon at redhat dot com
` (2 preceding siblings ...)
2009-04-02 20:10 ` pmuldoon at redhat dot com
@ 2009-04-02 20:11 ` pmuldoon at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2009-04-02 20:11 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pmuldoon at redhat dot com 2009-04-02 20:11 -------
Reviewed, approved and committed here:
http://sourceware.org/ml/archer/2009-q2/msg00008.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-02 20:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26 8:52 [Bug c++/10008] New: Modify Python value pretty-printers to search for a C++ base class printer, if a specialised one does not exist pmuldoon at redhat dot com
2009-03-26 8:52 ` [Bug c++/10008] " pmuldoon at redhat dot com
2009-03-26 8:54 ` pmuldoon at redhat dot com
2009-04-02 20:10 ` pmuldoon at redhat dot com
2009-04-02 20:11 ` pmuldoon at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).