From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5240 invoked by alias); 3 Mar 2005 14:20:45 -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 5163 invoked from network); 3 Mar 2005 14:20:34 -0000 Received: from unknown (HELO lakermmtao12.cox.net) (68.230.240.27) by sourceware.org with SMTP; 3 Mar 2005 14:20:34 -0000 Received: from white ([68.9.64.121]) by lakermmtao12.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050303142029.JOEA2476.lakermmtao12.cox.net@white>; Thu, 3 Mar 2005 09:20:29 -0500 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1D6rBo-0008V4-00; Thu, 03 Mar 2005 09:20:32 -0500 Date: Thu, 03 Mar 2005 14:20:00 -0000 From: Bob Rossi To: Karganov Konstantin Cc: gdb@sources.redhat.com Subject: Re: Broken MI output Message-ID: <20050303142032.GA32613@white> Mail-Followup-To: Karganov Konstantin , 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.3.28i X-SW-Source: 2005-03/txt/msg00021.txt.bz2 On Thu, Mar 03, 2005 at 05:10:35PM +0300, Karganov Konstantin wrote: > Hello. > > I tried to run hello-world application under "gdb -i=mi" > and got the following: > > ------------------------- > ~"GNU gdb 6.3\n" > ~"Copyright 2004 Free Software Foundation, Inc.\n" > ~"GDB is free software, covered by the GNU General Public License, and you > are\n" > ~"welcome to change it and/or distribute copies of it under certain > conditions.\n" > ~"Type \"show copying\" to see the conditions.\n" > ~"There is absolutely no warranty for GDB. Type \"show warranty\" for > details.\n" > ~"This GDB was configured as \"i686-pc-linux-gnu\"..." > ~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n" > ~"\n" > (gdb) > run > &"run\n" > Hello world! > ~"Current language: auto; currently c\n" > ^done,reason="exited-normally" > (gdb) > ------------------------- > > Two lines here are out of the grammar syntax: "run" line, that is only > echo of the terminal, that doesnt go out of the debugger (presents only in > debugger stdin) and the " Hello world!" line that is an application output > mixed with MI output. The second line goes out of the debugger stdout and > surely breaks MI-parser. > Am I right that this is a bug ("@ c-string" format is missing) that needs > to be fixed? The echoing should be turned off from the GDB side. There are several ways to do this. Are you communicating with GDB through a pipe, pty? The inferior output needs to be redirected to another pty using the console 'tty' command. This will "unmix" the inferior output and the MI output. Thanks, Bob Rossi