This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: MI interface: where is the stdout of the debugged program?
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Aurelian Melinte <ame01 at gmx dot net>
- Cc: gdb at sourceware dot org
- Date: Sun, 7 Mar 2010 11:35:49 -0500
- Subject: Re: MI interface: where is the stdout of the debugged program?
- References: <4B92F78D.6050004@gmx.net>
On Sat, Mar 06, 2010 at 07:47:09PM -0500, Aurelian Melinte wrote:
> I am experimenting with MI through a perl script. The program
> debugged is using stdout to print some diagnostics messages but I do
> not the debugee stdout messages coming through to the perl script.
> All I get are the gdb messages.
This only works if you're getting output from e.g. a remote target
using GDB-based I/O. So you have to be prepared for @"" messages, but
you can't rely on them. For native code, you can create a new TTY and
use "-gdb-set inferior-tty" to direct the new program to that TTY.
> Reading from http://sources.redhat.com/gdb/current/onlinedocs/gdb.html#GDB_002fMI-General-Design
> I am under the impression I should get the debugee stdout as well:
> |"@" |string-output:The target output stream contains any textual
> output from the running target. This is only present when GDB's event
> loop is truly asynchronous, which is currently only the case for
> remote targets"
Hmm, this is stale; asynchronous-ness is not related to this topic.
--
Daniel Jacobowitz
CodeSourcery