This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Not seeing target output in GDB/MI
- From: Daniel Jacobowitz <drow at false dot org>
- To: Johannes Overmann <Johannes dot Overmann at arm dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 10 Dec 2004 08:38:10 -0500
- Subject: Re: Not seeing target output in GDB/MI
- References: <41B97648.5040107@arm.com>
On Fri, Dec 10, 2004 at 11:11:20AM +0100, Johannes Overmann wrote:
> I can factor out two simple questions:
>
> - Is there a way to see the target output (stdout) unbuffered or line
> buffered
> and still using pipes to comminucate with gdb?
>
> - Why is the target output not visible in the target-stream-output
> described in the
> MI documentation (e.g. prefixed by @)? I see it just as any other output
> coming from gdb without any indication that it comes from the target.
They have the same answer: GDB does not support encapsulated output for
native targets. What's probably happening is that the inferior is
writing to the same pipe that you used to communicate with GDB, and
your C library is defaulting to block buffering when it detects that
stdout is not a TTY.
Some remote targets offer output encapsulation. It wouldn't be
terribly hard to implement for native, but it isn't terribly useful
either, so no one has done the work. Easiest thing to do may be to use
the "tty" command in GDB. I don't know if there's a matching MI
command.
--
Daniel Jacobowitz