From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32244 invoked by alias); 26 Jan 2007 14:00:46 -0000 Received: (qmail 32225 invoked by uid 22791); 26 Jan 2007 14:00:44 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 26 Jan 2007 14:00:31 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1HARcy-0007gN-53; Fri, 26 Jan 2007 09:00:28 -0500 Date: Fri, 26 Jan 2007 14:00:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: "target remote | " stderr Message-ID: <20070126140028.GA29456@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200701261653.53834.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701261653.53834.vladimir@codesourcery.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00535.txt.bz2 On Fri, Jan 26, 2007 at 04:53:53PM +0300, Vladimir Prus wrote: > > At the moment, when handling > > target remote | whatever > > gdb does not do anything with 'whatever''s stderr. This is not good, > because when using MI, frontend might not even look at stderr at all, > so messages from 'whatever' get lost. > > This patch fixes that. The fix is only for Linux, I plan to do the > same with mingw support, but only if this patch is considered OK. > > - Volodya > > Pass stderr of program run with "target remote |" > via gdb_stderr. > * serial.c (serial_open): Set error_fd to -1. > * serial.h (struct serial): New field error_fd. > * ser-pipe.c (pipe_open): Create another pair > of sockets. Pass stderr to gdb. > * ser-base.c (generic_readchar): Check if there's > anything in stderr channel and route that to gdb_stderr. The patch seems OK to me; though I would like to be sure we can implement this for MinGW before we get too used to the idea. -- Daniel Jacobowitz CodeSourcery