From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1529 invoked by alias); 10 Dec 2004 13:38:19 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1472 invoked from network); 10 Dec 2004 13:38:15 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 10 Dec 2004 13:38:15 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CckyI-0002xA-LX; Fri, 10 Dec 2004 08:38:10 -0500 Date: Fri, 10 Dec 2004 13:38:00 -0000 From: Daniel Jacobowitz To: Johannes Overmann Cc: gdb@sources.redhat.com Subject: Re: Not seeing target output in GDB/MI Message-ID: <20041210133810.GA11236@nevyn.them.org> Mail-Followup-To: Johannes Overmann , gdb@sources.redhat.com References: <41B97648.5040107@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41B97648.5040107@arm.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00070.txt.bz2 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