From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27683 invoked by alias); 16 Jul 2006 12:02:28 -0000 Received: (qmail 27673 invoked by uid 22791); 16 Jul 2006 12:02:27 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao04.cox.net (HELO eastrmmtao04.cox.net) (68.230.240.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 16 Jul 2006 12:02:25 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao04.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060716120222.DQYD25210.eastrmmtao04.cox.net@localhost.localdomain>; Sun, 16 Jul 2006 08:02:22 -0400 Received: from bob by localhost.localdomain with local (Exim 4.60) (envelope-from ) id 1G25L5-0000GL-01; Sun, 16 Jul 2006 08:03:11 -0400 Date: Sun, 16 Jul 2006 14:08:00 -0000 From: Bob Rossi To: Nick Roberts Cc: teawater , gdb@sourceware.org Subject: Re: How about remote MI? Message-ID: <20060716120310.GA513@brasko.net> References: <17593.486.472132.416318@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17593.486.472132.416318@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.11 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00105.txt.bz2 > > BTW, I am trying to make vim2gdb (An vim plug-in to make vim can debug > > code through GDB. It use GDBRUI in before.) support MI. But the MI > > output format is not very easy to parse. Could some people recommend a > > programe or example that parse the MI output for me? If not, I think I > > will use lex to parse it. > > I think the idea is that the front end parses it directly. Generating an > intermediate langusage just adds to the complexity. If you think MI can > be improved then please make suggestions. This is simply not true. It is possible to write an MI parser that "works". However, AFAIK, no one (besides maybe eclispse) has written a production quality MI parser that works under all cicumstances, is well tested, ... Having everyone use there own parser is a lose-lose situation. It will add to the MI maintaince burden with loads of questions per developer, it will waste every projects time that wants a parser, and it will give the community at large a bad sense of GDB front ends (which it already has BTW) because each not fully tested MI parser will fail in slightly different boundry cases. I have started an effort here to provide an MI parser. It is far from complete. It is not well tested. It does not have documentation. However, it does syntacticaly parse the output of the test suite. svn co https://svn.sourceforge.net/svnroot/cgdb/cgdb/trunk/lib/gdbmi gdbmi Sometime in the future I will get more time and will eventually get this silly parser complete. At this point, you can use it to get an AST of the MI, which is still very useful. Thanks, Bob Rossi