This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB frontends, MI-speak and object notation
- From: Tom Tromey <tromey at redhat dot com>
- To: Dmitry Dzhus <dima at sphinx dot net dot ru>
- Cc: gdb at sources dot redhat dot com
- Date: Sat, 30 May 2009 15:27:03 -0600
- Subject: Re: GDB frontends, MI-speak and object notation
- References: <87d49tv3z2.fsf@sphinx.net.ru> <87r5y6y22h.fsf@sphinx.net.ru>
- Reply-to: tromey at redhat dot com
>>>>> "Dmitry" == Dmitry Dzhus <dima@sphinx.net.ru> 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