From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12896 invoked by alias); 30 May 2009 21:27:15 -0000 Received: (qmail 12888 invoked by uid 22791); 30 May 2009 21:27:14 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 May 2009 21:27:09 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n4ULR6OJ001311 for ; Sat, 30 May 2009 17:27:06 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4ULR6qJ013746 for ; Sat, 30 May 2009 17:27:06 -0400 Received: from opsy.redhat.com (vpn-12-155.rdu.redhat.com [10.11.12.155]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4ULR4B2031616; Sat, 30 May 2009 17:27:05 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 27E2848635; Sat, 30 May 2009 15:27:04 -0600 (MDT) To: Dmitry Dzhus Cc: gdb@sources.redhat.com Subject: Re: GDB frontends, MI-speak and object notation References: <87d49tv3z2.fsf@sphinx.net.ru> <87r5y6y22h.fsf@sphinx.net.ru> From: Tom Tromey Reply-To: tromey@redhat.com Date: Sat, 30 May 2009 21:27:00 -0000 In-Reply-To: <87r5y6y22h.fsf@sphinx.net.ru> (Dmitry Dzhus's message of "Sat\, 30 May 2009 20\:42\:46 +0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00198.txt.bz2 >>>>> "Dmitry" == Dmitry Dzhus writes: Dmitry> I've managed to map MI output to structured data using JSON Dmitry> parser from Emacs. Fun approach... but I would recommend simply writing a true MI parser. I think there are some elisp parser generators you could use. Dmitry> The other question is, why not use JSON in GDB/MI at all? JSON didn't exist when MI was written :). But yeah, XML or even sexprs would have been a better choice, IMNSHO. However, that is water under the bridge now... there are a dozen working parsers, and I think breaking those should not be done lightly, or perhaps at all. BTW there are also known MI bugs in gdb, e.g.: http://sourceware.org/bugzilla/show_bug.cgi?id=9659 There was a discussion about this one on the list; I think the short answer is that MI consumers just have to work around the broken bits. (I think it would be nice if we could enumerate such cases in the manual, so that MI users don't have to keep rediscovering this stuff, but I am not sufficiently aware of all the oddities myself to do this.) Tom