From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1672 invoked by alias); 8 Feb 2005 16:42:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1616 invoked from network); 8 Feb 2005 16:42:06 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Feb 2005 16:42:06 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j18Gg6u6004581 for ; Tue, 8 Feb 2005 11:42:06 -0500 Received: from localhost.redhat.com (vpn50-111.rdu.redhat.com [172.16.50.111]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j18Gg5O22720; Tue, 8 Feb 2005 11:42:05 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 215F97D79; Tue, 8 Feb 2005 11:41:36 -0500 (EST) Message-ID: <4208EBBD.30307@gnu.org> Date: Tue, 08 Feb 2005 16:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Thomas Elam Cc: gdb@sources.redhat.com Subject: Re: What are the prescribed ways to extend gdb? Examples? References: <6251c71605010208593729d960@mail.gmail.com> In-Reply-To: <6251c71605010208593729d960@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00044.txt.bz2 Thomas Elam wrote: Just FYI, your e-mail answers your own question -> the assumptions and expectations are all correct. MI has clear traction amongst the various IDE developers (EMACS, Eclipse's CDT). Andrew > What are the currently prescribed ways to extend > gdb? I am interested in adding to gdb: (1) a full > scripting language (not tcl) or (2) a new GUI front-end. > These additions could use the same or different > methods of extending gdb. I *might* want to link my > code in with gdb. I much prefer a machine-oriented > interface to a human-oriented one. > > I have found the following references about extending gdb: > > [1] Section 4.2 of the `GDB Internals' document, > `UI-Independent Output--the ui_out Function': > http://sources.redhat.com/gdb/current/onlinedocs/gdbint_4.html#SEC19 > > [2] Section 24 of the `Debugging with GDB' > document, `The GDB/MI Interface': > http://sources.redhat.com/gdb/current/onlinedocs/gdb_25.html#SEC223 > This is also described in the part of GDB's info page > related to the `-interface' option. > > [3] Section A of the `GDB Internals' document, `GDB > Currently available observers': > http://sources.redhat.com/gdb/current/onlinedocs/gdbint_19.html#SEC188 > > It looks like [2] is the way to go for people > who are not maintainers of gdb. > > Examples? I've found Insight, but I think it links > into gdb and is apparently hard to maintain for that > reason. As far as I know, most or all of the front- > ends to gdb open gdb as a separate process and > parse its human-oriented output, which is not > ideal, with the exception of an interface written by > Moses Dejong. He describes his scripting interface > to gdb in this paper: > http://www.tcl.tk/community/tcl2004/Tcl2003papers/dejong.pdf > Near the end of the paper, he tells where the > Tcl source code for the interface can be found: > http://www.uncounted.org/tcl/gdbmi-0.1.tgz > It uses version 1 of GDB's MI (machine-oriented) > interface. I've tried this Tcl interface with > the Debian package gdb-6.3-5 . It seems to work, > but I have to work with it some more, since I don't > remember much Tcl. > > Any advice for me? >