From: Tom Tromey <tromey@redhat.com>
To: Andrew Oakley <andrew@ado.is-a-geek.net>
Cc: "André Pönitz" <andre.poenitz@nokia.com>,
"Joachim Protze" <joachim.protze@wh2.tu-dresden.de>,
gdb@sourceware.org
Subject: Re: Python API - pretty printing complex types
Date: Thu, 10 Mar 2011 21:11:00 -0000 [thread overview]
Message-ID: <m339muadg6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110309193051.6c757cf5@ado-gentoo> (Andrew Oakley's message of "Wed, 9 Mar 2011 19:30:51 +0000")
>>>>> "Andrew" == Andrew Oakley <andrew@ado.is-a-geek.net> writes:
Andrew> I think it would be nice to be able to return pretty printers from the
Andrew> children iterator of another pretty printer. This would allow "phony
Andrew> groups" to be created - simply return another pretty printer for the
Andrew> group and it will get printed in the usual fashion.
Yes, good idea.
Andrew> 3. Assume that objects that are not gdb.Value instances are pretty
Andrew> printers. This prevents any further extensions from working in the
Andrew> same way.
Andrew> 4. Assume that objects with a to_string member are pretty printers.
Andrew> This is the only required member of pretty printers and seems more in
Andrew> line with other python libraries. We probably want to check for this
Andrew> after checking if the object was a gdb.Value, both for performance
Andrew> reasons and to ensure no existing code has an nasty surprises.
Andrew> I think option 4 is the best choice here and I'm happy to write a patch
Andrew> to do this if there is some agreement that it is a reasonable decision
Andrew> (and therefore might actually get committed).
I think either #3 or #4 would be fine. I would approve a clean
(well, "clean-enough" :-) implementation of either.
If you do plan to implement this, contact me off-list so we can get the
paperwork stuff started.
If you don't plan to do it, please file it in bugzilla.
Tom
prev parent reply other threads:[~2011-03-10 21:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 0:43 Andrew Oakley
2011-03-09 8:06 ` Joachim Protze
2011-03-10 21:08 ` Tom Tromey
[not found] ` <201103090954.49355.andre.poenitz@nokia.com>
2011-03-09 19:28 ` Andrew Oakley
2011-03-10 9:07 ` André Pönitz
2011-03-10 21:25 ` Tom Tromey
2011-03-11 7:41 ` Joachim Protze
2011-03-11 11:25 ` André Pönitz
2011-03-10 21:11 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m339muadg6.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=andre.poenitz@nokia.com \
--cc=andrew@ado.is-a-geek.net \
--cc=gdb@sourceware.org \
--cc=joachim.protze@wh2.tu-dresden.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox