From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20480 invoked by alias); 11 Apr 2008 07:55:05 -0000 Received: (qmail 20433 invoked by uid 22791); 11 Apr 2008 07:55:05 -0000 X-Spam-Check-By: sourceware.org Received: from hoat.troll.no (HELO hoat.troll.no) (62.70.27.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Apr 2008 07:54:36 +0000 Received: from hoat.troll.no (tedur.troll.no [62.70.27.154]) by hoat.troll.no (Postfix) with SMTP id 3637320B3E for ; Fri, 11 Apr 2008 09:54:34 +0200 (CEST) Received: from gar.trolltech.de (gar.trolltech.de [10.4.0.24]) by hoat.troll.no (Postfix) with ESMTP id 1A6C620B3D for ; Fri, 11 Apr 2008 09:54:34 +0200 (CEST) From: =?iso-8859-1?q?Andr=E9_P=F6nitz?= To: gdb@sourceware.org Subject: Re: GDB MI Interface Date: Fri, 11 Apr 2008 12:19:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804110955.38021.apoenitz@trolltech.com> 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: 2008-04/txt/msg00091.txt.bz2 On Friday 11 April 2008 02:07:15 Lokesh Kumar wrote: > Hi all, Hi Lokesh. > I want to use the GDB MI interface to communicate with gdb in the > backend of my software. Surprisingly, the current information on this > topic is very less on the web. So I thought of turning to the gdb > community itself. I had the following questions to ask - > > 1. Does the parser for MI output already exists ? I am not aware of an "official" MI parser. I am using a home grown one which is ~260 lines of straight-forward C++, It's probably not complete, but reads the parts I am interested in sufficiently well ;-) > 2. Are there some frontends debugger that are using this ? As far as I > know, the ddd and kdb both use the CLI option. See Vladimir's posting ;-) Apart from that I am trying to use MI as it relays structured data much better then the CLI. The two main problems with gdb/MI is that it is (a) incomplete, so there are lots of "traditional" commands that do not have an MI equivalent or whose MI equivalent just chickens out saying "not implemented", and (b) that it seems to be a constant flux. It's a bit of a trade-off. _Not_ using MI would give an imaginary frontend the possibility to use Intel's debugger, too, as this can be configured to look pretty much like the gdb CLI. > 3. Has there been any documentation on how to use gdb-MI. The current > documentation is, as they say, like a reference manual. Chapter 24 in the docs found on http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html is usable. The problem is that there are different flavours of MI out in the wild, and point (b) above leading to the necessity to double-check anything written in the docs with the actual gdb incarnations you want to support - which is a wee bit less convienient than you could dream of in a perfect world ;-) Regards, Andre'