This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: "target remote | " stderr
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 26 Jan 2007 09:00:28 -0500
- Subject: Re: "target remote | " stderr
- References: <200701261653.53834.vladimir@codesourcery.com>
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