From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16769 invoked by alias); 29 Jun 2010 07:43:33 -0000 Received: (qmail 16756 invoked by uid 22791); 29 Jun 2010 07:43:32 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_50,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.nokia.com (HELO mgw-mx03.nokia.com) (192.100.122.230) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jun 2010 07:43:25 +0000 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o5T7gt1g026319 for ; Tue, 29 Jun 2010 10:43:21 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 29 Jun 2010 10:43:17 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 29 Jun 2010 10:43:16 +0300 Received: from gar.localnet (berwst16747.europe.nokia.com [172.25.167.47]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o5T7hEbD018447 for ; Tue, 29 Jun 2010 10:43:15 +0300 From: =?utf-8?q?Andr=C3=A9_P=C3=B6nitz?= To: "gdb-patches@sourceware.org" Subject: Re: [patch] PR python/11407 Date: Tue, 29 Jun 2010 07:43:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32-21-generic; KDE/4.4.2; i686; ; ) References: <4C23426F.4020502@redhat.com> <201006280826.08385.andre.poenitz@nokia.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201006290943.36954.andre.poenitz@nokia.com> X-Nokia-AV: Clean Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00673.txt.bz2 On Monday 28 June 2010 18:52:32 you wrote: > >>>>> "Andr=C3=A9" =3D=3D Andr=C3=A9 P=C3=B6nitz writes: >=20 > Andr=C3=A9> I'd guess it would be nice for a front end to get a hint that > Andr=C3=A9> something unusual happened in case it wants to have some kind= of > Andr=C3=A9> special handling of such cases (like localizing the error > Andr=C3=A9> message). >=20 > Andr=C3=A9> A separate field error=3D"...", or perhaps value=3D" Andr=C3=A9> variable: %s>" as suggested with an additional field iserror= =3D"1" > Andr=C3=A9> would be easier to handle than checking the "value" field for > Andr=C3=A9> well-known strings, especially if such content could be legal > Andr=C3=A9> output in some cases, too. >=20 > That would be fine with me. >=20 > I am curious to hear what Volodya wants. >=20 > Andr=C3=A9> [But take this with a grain of salt, I/we haven't used MI for > Andr=C3=A9> data retrieval for a while now, so maybe there are already en= ough > Andr=C3=A9> hints in the output nowadays.] >=20 > What do you use? I use a rather monolithic python script[1] iterating over the stack variabl= es as well as a few expressions for watched expressions and tooltips, generati= ng 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 f= rom a std::vector) 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=20 flexibility nowadays ;-) Andre' PS: In case you are interested, the main script is here: =20 http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/share/qtcreato= r/gdbmacros/dumper.py And there are "pretty printers" here: http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/share/qtcreato= r/gdbmacros/gdbmacros.py