From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31400 invoked by alias); 16 Aug 2013 12:34:55 -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 31390 invoked by uid 89); 16 Aug 2013 12:34:55 -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 12:34:54 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VAJEx-0002MN-JN from Yao_Qi@mentor.com ; Fri, 16 Aug 2013 05:34:51 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 16 Aug 2013 05:34:50 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Fri, 16 Aug 2013 05:34:50 -0700 Message-ID: <520E1C34.2000907@codesourcery.com> Date: Fri, 16 Aug 2013 12:34: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: Pedro Alves CC: , , Eli Zaretskii Subject: Re: [PATCH] Unbuffer stdout and stderr on windows References: <51EE23F8.1070905@codesourcery.com> <83wqohw4ee.fsf@gnu.org> <20130729192559.GA5348@ednor.casa.cgf.cx> <83d2q1xiyv.fsf@gnu.org> <51F6C7B2.3020400@redhat.com> <20130731034045.GA5565@ednor.casa.cgf.cx> <20130812211105.GA11128@adacore.com> <8361v9piop.fsf@gnu.org> <20130815173618.GA6955@ednor.casa.cgf.cx> <83eh9uonlg.fsf@gnu.org> <20130815175940.GD6955@ednor.casa.cgf.cx> <520E1109.7000304@redhat.com> In-Reply-To: <520E1109.7000304@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-08/txt/msg00423.txt.bz2 On 08/16/2013 07:46 PM, Pedro Alves wrote: > However, the Windows runtime, in its infinite wisdom, makes stderr > fully buffered if connected to a pipe. > > So all this makes me very much question the desire to detect > if a native Win32 GDB is running under Cygwin. > > IMO, stderr should_always_ be forced to unbuffered. From this long discussion, people agree that stderr should be unbuffered. > > I can't really imagine that leaving stdout fully buffered to > ever be good (which the cygwin detection seems to want to preserve), > even for frontends, given GDB is an interactive program, and even > MI is text/line based. > > So I think the "in cygwin" detection is really not necessary > or desirable, and this patch should go back to its original form: However, we didn't have an agreement on what to set for stdout. As you posted above, on Win32, stdout can be either full buffered or non-buffered. If we change stdout to non-buffered, there are two concerns, 1) GDB will slow down, 2) cause troubles to front-end, like Emacs. Is it useful to reduce the concerns by measuring the slow down and testing patched GDB under Emacs? -- Yao (齐尧)