GDB GUI
Joel Brobecker
brobecker@adacore.com
Wed Nov 4 20:15:00 GMT 2009
> On Wednesday 04 November 2009, Marco Menegazzi wrote:
> > I've already seen that documentation but my problem is that it does
> > not explain how to connect to this interface through code. It explains
> > how it is but not how to use it ... I want to connect through my java
> > code but the only idea I have is to call it directly from the code
> > with Runtime.exec ... but then I ask myself why to use gdb/mi that
> > returns a more complex output instead of calling directly gdb and
> > parse the stout to get what I want?
What we do in AdaCore's IDE is to create a pseudo-tty, and launch
the debugger using that pseudo-tty. That way, GDB thinks it is in
a terminal, and we get to send commands and receive their output.
I believe that this is also what tools such as "expect" do. The code
we used was originally taken from the emacs sources, so you might
be able to find some C code that does just that. Or perhaps Java
has some library classes that do that for you.
--
Joel
More information about the Gdb
mailing list