This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Unbuffer stdout and stderr on windows
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, yao at codesourcery dot com
- Date: Mon, 29 Jul 2013 20:51:14 +0100
- Subject: Re: [PATCH] Unbuffer stdout and stderr on windows
- References: <1374462417-7961-1-git-send-email-yao at codesourcery dot com> <838v0yy556 dot fsf at gnu dot org> <51EE23F8 dot 1070905 at codesourcery dot com> <83wqohw4ee dot fsf at gnu dot org> <20130729192559 dot GA5348 at ednor dot casa dot cgf dot cx> <83d2q1xiyv dot fsf at gnu dot org>
On 07/29/2013 08:30 PM, Eli Zaretskii wrote:
>> Date: Mon, 29 Jul 2013 15:25:59 -0400
>> From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
>>
>> Note that this is only a problem for non-Cygwin versions of gdb. It
>> sounds like someone is using mingw-built versions of gdb in a cygwin
>> pty session.
>
> Yes. Specifically, an attempt to run a MinGW GDB through the test
> suite using Cygwin expect.
IMO, the ultimate solution is to run the testsuite with a small
netcat-like wrapper program that creates a console, redirects
the child's stdin/stdout/stderr to the console, and bridges data
between the cygwin pipes and the console.
cygwin (io=tty/pipe) <-> [ pipe <-> console ] <-> gdb (io=console)
The testsuite would then spawn "wrapper.exe gdb.exe ..." instead of
"gdb.exe".
GDB would then see a regular console for stdin/stdout/stderr, and
work out of the box. PR15791 points at winpty, an open source
tool that from the description does that (and more). It'd be nice
if that path would be investigated.
--
Pedro Alves