This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Wrapping GDB
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Uri Moszkowicz <uri at 4refs dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 15 Apr 2011 16:53:00 -0400
- Subject: Re: Wrapping GDB
- References: <BANLkTi=ztW2Zi8gv0fBcf6GtR0KqMCKK0g@mail.gmail.com>
On Fri, Apr 15, 2011 at 04:36:46PM -0400, Uri Moszkowicz wrote:
> Hi,
> I'm trying to use GDB to write some tests for a C++ program and am
> having some trouble. The wrapper test is written in Groovy and it
> seems that GDB does not send its output to stdout so that it can be
> captured from a system call. Instead, it appears directly on the tty.
> I realize that there is a machine interface but I don't want to use it
> since the interaction has to be human readable for debugging when
> tests fail. Since my test runs on the Java platform I am unable to
> create a pseudo TTY for GDB. Expect seems to work but I don't want to
> write my tests in Expect and no comparable implementation exists for
> the Java platform. Do you have any suggestions? Is there an
> undocumented switch that I can use so that GDB will send all of its
> output to STDOUT/STDERR?
I suggest you use the machine interface (MI) anyway. It's human
readable and it's much easier to script this way.
--
Daniel Jacobowitz
Mentor Graphics