From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10177 invoked by alias); 28 May 2009 12:00:18 -0000 Received: (qmail 10162 invoked by uid 22791); 28 May 2009 12:00:15 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 May 2009 12:00:07 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1M9eHD-0000d5-2b for gdb@sources.redhat.com; Thu, 28 May 2009 12:00:03 +0000 Received: from 93-81-186-6.broadband.corbina.ru ([93.81.186.6]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 May 2009 12:00:03 +0000 Received: from dima by 93-81-186-6.broadband.corbina.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 May 2009 12:00:03 +0000 To: gdb@sources.redhat.com From: Dmitry Dzhus Subject: GDB frontends, MI-speak and object notation Date: Thu, 28 May 2009 12:00:00 -0000 Message-ID: <87d49tv3z2.fsf@sphinx.net.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-IsSubscribed: yes 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/msg00177.txt.bz2 Hi all. This summer I'm working on improvement for GDB Emacs frontend using GDB/MI as a part of Google Summer of Code, and I'm looking for advice. I wonder how other front-end developers handle GDB/MI output messages. In the code I'm working on, regular expressions are used to parse MI messages and extract certain values from them. This is pretty straightforward to write, but doesn't seem to fully use the «structuredness» of MI-speak, and lacks the spirit of MI. I'm reviewing means of mapping MI (which seems to be a subset of JSON with a few cosmetic differences and exceptions) to object-like structures so I can work with it on a higher level. Has anyone had similar ideas? I work with Lisp, so the mapping might be as follows: threads=[{id="1", target-id="LWP18334", frame={level="0", addr="0x08048b9a", func="mult_matrices_mt", args=[{name="m1", value="0x804ba30"}, {name="m2", value="0x804ba30"}], file="test.c", fullname="/home/sphinx/projects/gsoc/test.c", line="142"}, state="stopped"}], current-thread-id="1" to ((threads . (((id . "1") (target-id . "LWP18334") (frame . ((level . "0") (addr . "0x08048b9a") (func . "mult_matrices_mt") (args . (((name . "m1") (value . "0x804ba30")) ((name . "m2") (value . "0x804ba30")))) (file . "test.c") (fullname . "/home/sphinx/projects/gsoc/test.c") (line . "142"))) (state . "stopped")))) (current-thread-id . "1")) -- Happy Hacking. http://sphinx.net.ru む