Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: S?rgio Durigan J?nior <sergiodj@linux.vnet.ibm.com>
Cc: Marco Menegazzi <mene.thebear@gmail.com>, gdb@sourceware.org
Subject: Re: GDB GUI
Date: Wed, 04 Nov 2009 20:15:00 -0000	[thread overview]
Message-ID: <20091104201519.GY4573@adacore.com> (raw)
In-Reply-To: <200911041446.34726.sergiodj@linux.vnet.ibm.com>

> 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


  reply	other threads:[~2009-11-04 20:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 10:57 Marco Menegazzi
2009-11-02 16:36 ` Sérgio Durigan Júnior
2009-11-04 14:30   ` Marco Menegazzi
2009-11-04 14:36     ` André Pönitz
2009-11-04 15:02     ` Vladimir Prus
2009-11-04 20:06     ` Sérgio Durigan Júnior
2009-11-04 20:15       ` Joel Brobecker [this message]
2009-11-05  8:10     ` Nick Roberts
2009-11-06 16:41       ` Marco Menegazzi
2009-11-07  6:58         ` Nick Roberts
2009-11-07 10:20         ` Daniel Jacobowitz
2009-11-07 11:22           ` Marc Khouzam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091104201519.GY4573@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=mene.thebear@gmail.com \
    --cc=sergiodj@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox