From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17033 invoked by alias); 16 Aug 2013 01:07:04 -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 17024 invoked by uid 89); 16 Aug 2013 01:07:03 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.2 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 16 Aug 2013 01:07:02 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VA8VI-0003r2-Rf from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 15 Aug 2013 18:07:00 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 15 Aug 2013 18:07:01 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Thu, 15 Aug 2013 18:06:59 -0700 Message-ID: <520D7AFC.9000507@codesourcery.com> Date: Fri, 16 Aug 2013 01:07:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Subject: Re: [PATCH 1/3] Detect GDB is in cygwin References: <83a9l4xdst.fsf@gnu.org> <51FA137B.6070207@codesourcery.com> <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> In-Reply-To: <20130815174010.GB6955@ednor.casa.cgf.cx> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-08/txt/msg00411.txt.bz2 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 original problem this patch series want to address is about testing mingw32 native gdb in cygwin. This patch series can make dejagnu/testsuite happy, and improve the test result dramatically (without this patch series, the result is unusable at all). If Pierre or some one else thinks we need changes here on native windows, that is fine, let us do it. There are many issues for mingw, cygwin and windows, and it is impossible to fix all of them in one patch series. This patch series make some progresses and Pierre's incoming RCF will make some progresses too, isn't it what we want? > > I really don't like having gdb rely on undocumented Cygwin behavior. > You're introducing a tenuous dependency between the way Cygwin creates > ptys and pipes which could easily break if we decide to change something > in Cygwin. GDB has been relying on undocumented behaviours here and there. 'grep "no.*document" *.c" may find some. If the file name pattern of ptys and pipes are changed some day, we can update the code here to match, which is not difficult, IMO. 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. -- Yao (齐尧)