From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23622 invoked by alias); 15 Aug 2013 18:58:10 -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 23612 invoked by uid 89); 15 Aug 2013 18:58:09 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 15 Aug 2013 18:58:09 +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 r7FIw6i7012300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 15 Aug 2013 14:58:06 -0400 Received: from barimba (ovpn-113-91.phx2.redhat.com [10.3.113.91]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7FIw5TU003816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 15 Aug 2013 14:58:06 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Yao Qi 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> Date: Thu, 15 Aug 2013 18:58:00 -0000 In-Reply-To: <20130815174010.GB6955@ednor.casa.cgf.cx> (Christopher Faylor's message of "Thu, 15 Aug 2013 13:40:10 -0400") Message-ID: <8738qaok76.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-08/txt/msg00406.txt.bz2 cgf> I really don't like having gdb rely on undocumented Cygwin behavior. cgf> You're introducing a tenuous dependency between the way Cygwin creates cgf> ptys and pipes which could easily break if we decide to change something cgf> in Cygwin. One other idea that comes to mind is implementing the buffering and even line-ending transformations in gdb. I think most output like this in gdb winds up in stdio_file_write and stdio_file_fputs. The idea is something like, for Windows hosts, put stdout and stderr into "binary" mode. Then, have those two functions implement line buffering internally (again just for Windows hosts). Finally, have them also transform \n -> \r\n on output. Would this work? Tom