From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Baulig To: gdb@sourceware.cygnus.com Subject: Library interface to GDB Date: Thu, 27 May 1999 14:13:00 -0000 Message-id: <86k8tu9pyj.fsf@localhost.uni-trier.de> X-SW-Source: 1999-q2/msg00115.html Hello guys, I want to write a library interface to GDB and I'd like to ask you some questions and also get some feedback first. The gdb source code (4.18) contains a file gdb/doc/libgdb.texi which has been last modified in November 1993. This libgdb ist last mentioned in the ChangeLogs in 1994/95. In the internals manual I finally found a note that this "project" was aborted. On the other hand, I still find some references to it at least the Makefile.in, but I remember having seen something about it in the code itself. What is the current status for libgdb, is it still supported or already removed or whatever ... ? Basically I want to write a GNOME frontend for gdb, but not just "yet another gdb frontend", but *the* gdb frontend. Ideally it should export all its functionallity through CORBA so you can also use it in other projects like GNU Emacs, KDE or whatever. For me, gdb ist part of the GNU project and I think it is important to have some kind of "standard" library (or ideally CORBA, but that can also be handled by the GNOME part) interface for it. Such an interface should not be specific to any special window system but be usable in any graphical gdb frontend. It's no problem for me to actually write the code, but I'd like to get some feedback first - and I'm open to any suggestions ... -- Martin Baulig - martin@home-of-linux.org - http://www.home-of-linux.org >From tromey@cygnus.com Thu May 27 15:00:00 1999 From: Tom Tromey To: gdb@sourceware.cygnus.com Subject: Re: Library interface to GDB Date: Thu, 27 May 1999 15:00:00 -0000 Message-id: <87ogj6uqq1.fsf@cygnus.com> References: <86k8tu9pyj.fsf@localhost.uni-trier.de> X-SW-Source: 1999-q2/msg00116.html Content-length: 850 >>>>> "Martin" == Martin Baulig writes: I don't know the answers to your gdb questions. Martin> Basically I want to write a GNOME frontend for gdb, but not Martin> just "yet another gdb frontend", but *the* gdb Martin> frontend. Ideally it should export all its functionallity Martin> through CORBA so you can also use it in other projects like Martin> GNU Emacs, KDE or whatever. Are you familiar with dryad? The author is working on a library that can be used to communicate with gdb. He is also writing a CORBA interface to gdb. I think it would make sense for these parts to be separate from the actual GUI. That way if you don't like his GUI for some reason you can implement your own -- but without reinventing the useful GUI-independent pieces. dryad is in the Gnome CVS repository. Tom >From campd@oit.edu Thu May 27 15:17:00 1999 From: Dave Camp To: tromey@cygnus.com Cc: gdb@sourceware.cygnus.com Subject: Re: Library interface to GDB Date: Thu, 27 May 1999 15:17:00 -0000 Message-id: References: <86k8tu9pyj.fsf@localhost.uni-trier.de> <87ogj6uqq1.fsf@cygnus.com> X-SW-Source: 1999-q2/msg00117.html Content-length: 2386 Tom Tromey writes: > >>>>> "Martin" == Martin Baulig writes: > Martin> Basically I want to write a GNOME frontend for gdb, but not > Martin> just "yet another gdb frontend", but *the* gdb > Martin> frontend. Ideally it should export all its functionallity > Martin> through CORBA so you can also use it in other projects like > Martin> GNU Emacs, KDE or whatever. > > Are you familiar with dryad? > The author is working on a library that can be used to communicate > with gdb. He is also writing a CORBA interface to gdb. Hi, I'm the author of Dryad, and I thought I'd clarify a little bit what the CORBA interface is. The CORBA interface isn't intended exactly to be a CORBA interface to GDB, but more of a generic 'Debugger' interface. In addition, the general idea of that interface (which is in the Corba module 'VDE' for 'Visual Development Environment') is that any particular GUI could implement it - whether or not that application uses GDB, or libdryad (the library that communicates with GDB). This CORBA interface would perhaps include a 'show the locals window' method. I am considering wrapping libdryad in a CORBA interface as well, to allow prospective GUIs to communicate with it via CORBA. That would be a bit more like a CORBA interface to GDB. > I think it would make sense for these parts to be separate from the > actual GUI. That way if you don't like his GUI for some reason you > can implement your own -- but without reinventing the useful > GUI-independent pieces. Yes, that's basically what it does - the CORBA interface is just that; an interface. Any debugger would be able to export the functionality, but the surrounding parts (Visual Development Environments utilizing the debugger, for example) would not necessarily know which debugger it was using. Anyway, I'd just thought I'd clarify something that may have already been perfectly clear. Thanks for your time, -dave And Martin - perhaps we can discuss working together on a debugger - taking some stuff from ggdb (for example, I like parts of the idl) and putting in Dryad, or whatever. No sense in us working on redundant projects. Email me and we'll discuss it. -- Dave Camp Student, Oregon Institute of Technology campd@oit.edu (541) 885-0261 http://davec.dhs.org "Machines have no conscience" - Queensryche >From martin@home-of-linux.org Thu May 27 16:12:00 1999 From: Martin Baulig To: Dave Camp Cc: tromey@cygnus.com, gdb@sourceware.cygnus.com Subject: Re: Library interface to GDB Date: Thu, 27 May 1999 16:12:00 -0000 Message-id: <863e0i9key.fsf@localhost.uni-trier.de> References: <86k8tu9pyj.fsf@localhost.uni-trier.de> <87ogj6uqq1.fsf@cygnus.com> X-SW-Source: 1999-q2/msg00118.html Content-length: 1403 Dave Camp writes: > And Martin - perhaps we can discuss working together on a debugger - > taking some stuff from ggdb (for example, I like parts of the idl) and > putting in Dryad, or whatever. No sense in us working on redundant > projects. Email me and we'll discuss it. Yes, sure. And my GDB library idea is not really a "redundant project", it should be a very low-level interface to gdb which basically means to put gdb into a library, export all important functions and add some wrappers to things where gdb outputs text for instance. If I understood your implementation correctly, your CORBA interface will talk to libdryad which handles the interaction with the debugger but is independent from any special debugger. This is a very good idea since it gives people the chance to use dryad with a different debugger than gdb as well. I just want to insert an additional "layer of abstraction" - a low-level interface to gdb which libdry will use so we'll have something like application (ie. dryad) -> -> libgdb (for gdb) dryad CORBA -> libdryad other application -> -> libfoo (for bar) Of cause we can discuss this, we really should work together on this project. -- Martin Baulig - martin@home-of-linux.org - http://www.home-of-linux.org >From martin@home-of-linux.org Thu May 27 16:13:00 1999 From: Martin Baulig To: tromey@cygnus.com Cc: gdb@sourceware.cygnus.com, campd@oit.edu Subject: Re: Library interface to GDB Date: Thu, 27 May 1999 16:13:00 -0000 Message-id: <86yaia85tw.fsf@localhost.uni-trier.de> References: <86k8tu9pyj.fsf@localhost.uni-trier.de> <87ogj6uqq1.fsf@cygnus.com> X-SW-Source: 1999-q2/msg00119.html Content-length: 1568 Tom Tromey writes: > >>>>> "Martin" == Martin Baulig writes: > > I don't know the answers to your gdb questions. > > Martin> Basically I want to write a GNOME frontend for gdb, but not > Martin> just "yet another gdb frontend", but *the* gdb > Martin> frontend. Ideally it should export all its functionallity > Martin> through CORBA so you can also use it in other projects like > Martin> GNU Emacs, KDE or whatever. > > Are you familiar with dryad? > The author is working on a library that can be used to communicate > with gdb. He is also writing a CORBA interface to gdb. I haven't looked very closely at it yet, but it really looks good. > I think it would make sense for these parts to be separate from the > actual GUI. That way if you don't like his GUI for some reason you > can implement your own -- but without reinventing the useful > GUI-independent pieces. Yes, I agree. I like his GUI, but other people (for instance KDE folks) may not like it and prefer using another. The problem I see at the moment is that the only way to communicate with gdb is to open a pipe and parse it's output. This affects xxgdb, dryad and any other GUI. This means that the first thing every author of any gdb GUI needs to do is to write a parser. Such a parser is difficult to write, very inefficient and it will always be buggy. libgdb (Tom, you wrote it?) was already a good start to solve this problem, but sure it has its problems. -- Martin Baulig - martin@home-of-linux.org - http://www.home-of-linux.org >From tromey@cygnus.com Thu May 27 16:24:00 1999 From: Tom Tromey To: Martin Baulig Cc: gdb@sourceware.cygnus.com, campd@oit.edu Subject: Re: Library interface to GDB Date: Thu, 27 May 1999 16:24:00 -0000 Message-id: <87vhdet7td.fsf@cygnus.com> References: <86k8tu9pyj.fsf@localhost.uni-trier.de> <87ogj6uqq1.fsf@cygnus.com> <86yaia85tw.fsf@localhost.uni-trier.de> X-SW-Source: 1999-q2/msg00120.html Content-length: 845 >>>>> "Martin" == Martin Baulig writes: Martin> The problem I see at the moment is that the only way to Martin> communicate with gdb is to open a pipe and parse it's Martin> output. This affects xxgdb, dryad and any other GUI. Yes. Gdbtk works by inserting its own code into gdb and running the interface inside the gdb process. This might be doable for other GUIs as well, but it is probably painful as it means re-releasing gdb with the GUI. Martin> This means that the first thing every author of any gdb GUI Martin> needs to do is to write a parser. Such a parser is difficult Martin> to write, very inefficient and it will always be buggy. I agree. Martin> libgdb (Tom, you wrote it?) was already a good start to solve Martin> this problem, but sure it has its problems. Nope, I didn't write libgdb. Tom >From ovidiu@cup.hp.com Thu May 27 16:36:00 1999 From: Ovidiu Predescu To: Martin Baulig Cc: gdb@sourceware.cygnus.com Subject: Re: Library interface to GDB Date: Thu, 27 May 1999 16:36:00 -0000 Message-id: <199905272336.QAA03287@hpcll563.cup.hp.com> References: <86k8tu9pyj.fsf@localhost.uni-trier.de> X-SW-Source: 1999-q2/msg00121.html Content-length: 778 On 27 May 1999 23:12:52 +0200, Martin Baulig wrote: > Basically I want to write a GNOME frontend for gdb, but not just > "yet another gdb frontend", but *the* gdb frontend. Ideally it should > export all its functionallity through CORBA so you can also use it in > other projects like GNU Emacs, KDE or whatever. WDB, the HP supported version of GDB, already has a Corba interface and a GUI interface that uses it. You can download the sources and/or binaries from: http://www.hp.com/esy/lang/tools/Debuggers/WDB/index.html The sources for the Corba interface are under GPL and you can modify them to work with gdb 4.18 relatively easy. Best regards, -- Ovidiu Predescu http://www.geocities.com/SiliconValley/Monitor/7464/