From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28816 invoked by alias); 16 Aug 2013 16:37:44 -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 28796 invoked by uid 89); 16 Aug 2013 16:37:43 -0000 X-Spam-SWARE-Status: No, score=-50.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.2 Received: from mho-03-ewr.mailhop.org (HELO mho-01-ewr.mailhop.org) (204.13.248.66) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 16 Aug 2013 16:37:43 +0000 Received: from pool-173-48-46-190.bstnma.fios.verizon.net ([173.48.46.190] helo=cgf.cx) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1VAN1x-0005Qc-Ej; Fri, 16 Aug 2013 16:37:41 +0000 Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id 802D36011D; Fri, 16 Aug 2013 12:37:39 -0400 (EDT) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/vd33SjwzRr1kwUYDIC3yZ Date: Fri, 16 Aug 2013 16:37:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org, Yao Qi Subject: Re: [PATCH 1/3] Detect GDB is in cygwin Message-ID: <20130816163739.GA5330@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org, Yao Qi References: <20130803045452.GA997@ednor.casa.cgf.cx> <51FE1493.9070707@codesourcery.com> <20130805044122.GA1825@ednor.casa.cgf.cx> <51FF4483.5000102@codesourcery.com> <20130806020839.GA3362@ednor.casa.cgf.cx> <520067CB.4000300@codesourcery.com> <20130808051114.GA1553@ednor.casa.cgf.cx> <5203477B.8090203@codesourcery.com> <20130815174010.GB6955@ednor.casa.cgf.cx> <520D7AFC.9000507@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <520D7AFC.9000507@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-08/txt/msg00444.txt.bz2 On Fri, Aug 16, 2013 at 09:06:04AM +0800, Yao Qi wrote: >On 08/16/2013 01:40 AM, Christopher Faylor wrote: >> You've already acknowledged that your code will decide to become >> unbuffered whether you are running on a cygwin pipe or cygwin pty. What >> is special about cygwin pipes that makes you want to make them >> unbuffered while ignoring normal Windows pipes? > >In a cygwin session, I start gdb "./gdb", and stdin is a cygwin pty. If >I start gdb "echo yes | ./gdb", stdin is a cygwin pipe, right? > >In a windows console (cmd.exe), if I start gdb "echo yes | ./gdb", stdin >is a windows pipe. Is it correct? > >> >> Can you explain*why* you don't want to change the behavior on native >> windows? > >because the problem this patch series want to address is not related to >native windows, so we don't want to change its behaviour. We think >"buffered/unbuffered" are user visible behaviour, and we should be >careful on changing them. The "user visible behaviour" in this case would be running gdb with a pipe for stdin/stdout. It still isn't clear to me why it's acceptable to change this behavior for Cygwin but not for other platforms. The only reason I can see is that you are trying to run a testsuite over ssh without using the -t option to ssh. That causes ssh to use pipes. There is nothing Cygwin-specific about this behaviour. So, why wouldn't a MinGW gdb need something similar for "putty"? Or, why wouldn't a linux version need this behavior in similar scenarios? >On the other hand, do you think it is hard to get this documented in >Cygwin? in order to improve the interoperability between Cygwin and GDB. No, I'm not going to document this. This isn't to improve interoperability between Cygwin and GDB. It is to to make running MinGW gdb under cygwin's ptys and pipes work better. The fact that you've uncovered how Cygwin works under the hood doesn't mean that it is something that I want to officially support. cgf