From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20978 invoked by alias); 18 Nov 2005 13:48:47 -0000 Received: (qmail 20967 invoked by uid 22791); 18 Nov 2005 13:48:43 -0000 Received: from eastrmmtao01.cox.net (HELO eastrmmtao01.cox.net) (68.230.240.38) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 18 Nov 2005 13:48:43 +0000 Received: from white ([68.9.65.164]) by eastrmmtao01.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051118134751.UZXT2178.eastrmmtao01.cox.net@white>; Fri, 18 Nov 2005 08:47:51 -0500 Received: from bob by white with local (Exim 3.36 #1 (Debian)) id 1Ed6bD-0000ac-00; Fri, 18 Nov 2005 08:48:19 -0500 Date: Fri, 18 Nov 2005 13:48:00 -0000 From: Bob Rossi To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Output from target in MI mode Message-ID: <20051118134819.GA2255@white> Mail-Followup-To: Vladimir Prus , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00382.txt.bz2 On Fri, Nov 18, 2005 at 03:31:01PM +0300, Vladimir Prus wrote: > > Hi, > the docs, in "MI Stream records", say: > > `"@" STRING-OUTPUT' > The target output stream contains any textual output from the > running target. > > However, when I compile and run the following command: > > #include > > int main() > { > printf("Hi\n"); > return 0; > } > > I see this: > > (gdb) > -exec-run > ^running > (gdb) > Hi > *stopped,reason="exited-normally" > (gdb) > > The output from target is not prepended by "@". Gdb version is 6.3. > Is this a bug, or out-of-date docs, or I read the docs incorrectly? Currently, when running on the host, the output from the inferior is mixed with the MI output. If you would like to separate the output you can use the -inferior-set-tty command. This means that your front end needs to be capable of creating a pty pair. That way, all of the inferior output will be captured on a seperate descriptor. The 'target' in teh above sentence I believe is refering to when GDB is using a remote protocol to a specific piece of hardware. It's not refering to the host. Bob Rossi