From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22657 invoked by alias); 29 Jul 2013 19:51:26 -0000 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 Received: (qmail 22647 invoked by uid 89); 29 Jul 2013 19:51:26 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Jul 2013 19:51:26 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6TJpGwC025486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Jul 2013 15:51:17 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6TJpFGd013491; Mon, 29 Jul 2013 15:51:15 -0400 Message-ID: <51F6C7B2.3020400@redhat.com> Date: Mon, 29 Jul 2013 19:51:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org, yao@codesourcery.com Subject: Re: [PATCH] Unbuffer stdout and stderr on windows References: <1374462417-7961-1-git-send-email-yao@codesourcery.com> <838v0yy556.fsf@gnu.org> <51EE23F8.1070905@codesourcery.com> <83wqohw4ee.fsf@gnu.org> <20130729192559.GA5348@ednor.casa.cgf.cx> <83d2q1xiyv.fsf@gnu.org> In-Reply-To: <83d2q1xiyv.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00741.txt.bz2 On 07/29/2013 08:30 PM, Eli Zaretskii wrote: >> Date: Mon, 29 Jul 2013 15:25:59 -0400 >> From: Christopher Faylor >> >> 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