Daniel Jacobowitz wrote: >> 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. Implementing for MinGW required modifying libiberty so that it can catch stderr to a pipe. Here's a patch for gdb that relies on the libiberty patch. Does this sound OK provided libiberty patch is approved? - 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-mingw.c (pipe_windows_open): Pass PEX_STDERR_TO_PIPE to pex_run. Initialize sd->error_fd. * ser-base.c (generic_readchar): Check if there's anything in stderr channel and route that to gdb_stderr.