From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18507 invoked by alias); 31 Aug 2011 08:54:30 -0000 Received: (qmail 18499 invoked by uid 22791); 31 Aug 2011 08:54:30 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.nokia.com (HELO mgw-da02.nokia.com) (147.243.128.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 31 Aug 2011 08:54:15 +0000 Received: from gar.localnet (berwst16747.europe.nokia.com [172.25.167.47]) by mgw-da02.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p7V8s85N009677; Wed, 31 Aug 2011 11:54:09 +0300 From: =?utf-8?q?Andr=C3=A9_P=C3=B6nitz?= To: ext Tom Tromey Subject: Re: [RFA] 12843 Date: Wed, 31 Aug 2011 08:54:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-30-generic; KDE/4.5.5; i686; ; ) Cc: "gdb-patches@sourceware.org" References: <4E56C5A0.60802@redhat.com> <201108301833.47083.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: <201108311054.24074.andre.poenitz@nokia.com> X-Nokia-AV: Clean X-IsSubscribed: yes 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: 2011-08/txt/msg00650.txt.bz2 On Tuesday 30 August 2011 19:20:58 ext Tom Tromey wrote: > >>>>> "Andr=C3=A9" =3D=3D Andr=C3=A9 P=C3=B6nitz writes: >=20 > Tom> Do you generate MI-compliant output from Python? I'm curious. >=20 > Andr=C3=A9> Sort of. Originally it was fully compliant, then extra fields= had been > Andr=C3=A9> added and additional commas became "legal" (to save a few cyc= les > Andr=C3=A9> for the check whether they are necessary). But it's still pre= tty MI-ish. >=20 > I ask because I occasionally wonder whether it would be useful to add > support for converting (a subset of) Python objects to MI. >=20 > Phil might need it for breakpoint_ops; but I think we were thinking in > terms of a one-off, where a generic facility might be better. Having a generic way to serialize gdb's python objects to MI might be convenient. On the other hand that's generally not too difficult=20 to do "manually" for some specific case.=20 It might be also interesting from a performance point of view, especially if this would be usable for lots of items.=20 I am not sure how much of a difference this would make, though,=20 but allowing the "sloppy" commas I mentioned certainly made a difference, so I guess there's some general potential to gain a few cycles by doing the formatting in C and not in Python. Andre'