From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] future gdb-gdb.py things in my pipeline...
Date: Fri, 15 Jan 2010 18:13:00 -0000 [thread overview]
Message-ID: <m3k4vjck3u.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100115093910.GD6667@adacore.com> (Joel Brobecker's message of "Fri, 15 Jan 2010 13:39:10 +0400")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> I'll try to think of something generic that allows us:
Joel> - exclude certain fields
Joel> - print the fields we want in the order we want
Joel> - add certain artificial fields?
Joel> - other requirements???
If you change the printer to return a container, this problem is a lot
simpler. For any field where you just want to see the value as gdb
would ordinarily print it, you simply append the field's value:
result.append ('fieldname', value['fieldname'])
This is simple enough that, IMO, we don't need any extra machinery:
* To exclude a field, just don't append it.
* To order the fields, append them in the order you want.
* To add an artificial field, just append it with whatever name and
value you want.
Joel> * struct type pretty-printer. Would it make sense to print
Joel> the type code and name even if this information is in main_type.
Joel> The amount of output generated is still going to be reasonable,
Joel> while the extra data could be potentially very useful.
Yes please, usually when I print a struct type I want to see the name.
Joel> * We need pretty-printers for other GDB types as well. For instance,
Joel> a pretty-printer for struct value would be nice...
Yeah, that would be handy.
Tom
prev parent reply other threads:[~2010-01-15 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 9:39 Joel Brobecker
2010-01-15 18:13 ` 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=m3k4vjck3u.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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