This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI interface: where is the stdout of the debugged program?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]