public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Inconsistency between results of pretty-printing children
@ 2012-07-20 10:05 Oliver Buchtala
  2012-07-20 12:42 ` Oliver Buchtala
  2012-07-20 19:48 ` Tom Tromey
  0 siblings, 2 replies; 11+ messages in thread
From: Oliver Buchtala @ 2012-07-20 10:05 UTC (permalink / raw)
  To: gdb

Hi,

I am facing a problem with the python API for implemenation of 
Printer.children().

In working examples the metod of a pretty printer looks like that:

    def children():
       return [("key", 1)]

Usually one returns an iterable here.

The point is, that it returns tuples with key and value.
This works fine with existing IDEs using the MI interface (kdevelop, 
eclipse cdt, nemiver).

In the API documentation it is described, that this method should return 
alternating keys and values.
And that is exactly what is expected by gdb's print command when 
printing pretty.
To work with gdb's print method, I would adapt my printer to flatten the 
whole list so that keys and values are iterated in an alternating manner.

This way it happens, that my pretty printer can not be used in IDEs and 
with gdb's print simultanously.
Am I doing something wrong?

Regards,
Oliver

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-07-21  0:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 10:05 Inconsistency between results of pretty-printing children Oliver Buchtala
2012-07-20 12:42 ` Oliver Buchtala
2012-07-20 19:49   ` Tom Tromey
2012-07-20 20:11     ` Oliver Buchtala
2012-07-20 19:48 ` Tom Tromey
     [not found]   ` <5009B73B.2030702@googlemail.com>
2012-07-20 20:14     ` Tom Tromey
2012-07-20 20:20       ` Oliver Buchtala
2012-07-20 20:36       ` Oliver Buchtala
2012-07-20 20:58         ` Oliver Buchtala
2012-07-20 21:20       ` Oliver Buchtala
2012-07-21  0:12       ` Oliver Buchtala

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).