From: "André Pönitz" <andre.poenitz@nokia.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] PR python/11407
Date: Tue, 29 Jun 2010 07:43:00 -0000 [thread overview]
Message-ID: <201006290943.36954.andre.poenitz@nokia.com> (raw)
In-Reply-To: <m3aaqfyu9b.fsf@fleche.redhat.com>
On Monday 28 June 2010 18:52:32 you wrote:
> >>>>> "André" == André Pönitz <andre.poenitz@nokia.com> writes:
>
> André> I'd guess it would be nice for a front end to get a hint that
> André> something unusual happened in case it wants to have some kind of
> André> special handling of such cases (like localizing the error
> André> message).
>
> André> A separate field error="...", or perhaps value="<error reading
> André> variable: %s>" as suggested with an additional field iserror="1"
> André> would be easier to handle than checking the "value" field for
> André> well-known strings, especially if such content could be legal
> André> output in some cases, too.
>
> That would be fine with me.
>
> I am curious to hear what Volodya wants.
>
> André> [But take this with a grain of salt, I/we haven't used MI for
> André> data retrieval for a while now, so maybe there are already enough
> André> hints in the output nowadays.]
>
> What do you use?
I use a rather monolithic python script[1] iterating over the stack variables
as well as a few expressions for watched expressions and tooltips, generating
all interesting data for the "Locals and Watchers" view in one go.
The approach reduces roundtrip count to a minimum, at the price of repeating
some unnecessary work each time the inferior stops. It's worthwhile though.
As a rule of thumb one can retrieve 50-150 simple data items (say, values from
a std::vector<int>) in the time an additional roundtrip would take (~30ms).
Apart from that, the script creates exactly those pieces of data that are
used in the Gui, and it's easy to generate arbitrary subtrees, including
results from inferior calls and such, having individual formats for them,
using far less code in the front end than the MI based version (which is
still around, but only used on Mac and for older versions of gdb on Linux).
It is really nice (and highly appreciated) that gdb allows this degree of
flexibility nowadays ;-)
Andre'
PS: In case you are interested, the main script is here:
http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/share/qtcreator/gdbmacros/dumper.py
And there are "pretty printers" here:
http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/share/qtcreator/gdbmacros/gdbmacros.py
prev parent reply other threads:[~2010-06-29 7:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 11:33 Phil Muldoon
2010-06-24 15:10 ` Jan Kratochvil
2010-06-24 18:10 ` Tom Tromey
2010-06-24 22:01 ` Phil Muldoon
2010-06-25 6:56 ` Phil Muldoon
2010-06-25 14:27 ` Phil Muldoon
2010-06-25 18:25 ` Tom Tromey
2010-06-25 21:20 ` Phil Muldoon
2010-07-07 17:02 ` Phil Muldoon
2010-08-09 19:41 ` Phil Muldoon
2010-08-31 18:42 ` Phil Muldoon
2010-09-08 19:25 ` Tom Tromey
2010-06-26 17:10 ` Doug Evans
2010-06-28 6:26 ` André Pönitz
2010-06-28 16:52 ` Tom Tromey
2010-06-29 7:43 ` André Pönitz [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=201006290943.36954.andre.poenitz@nokia.com \
--to=andre.poenitz@nokia.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