From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23080 invoked by alias); 13 Aug 2013 17:28:50 -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 23064 invoked by uid 89); 13 Aug 2013 17:28:50 -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-02-ewr.mailhop.org (HELO mho-02-ewr.mailhop.org) (204.13.248.72) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 13 Aug 2013 17:28:49 +0000 Received: from pool-173-48-46-190.bstnma.fios.verizon.net ([173.48.46.190] helo=cgf.cx) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1V9IOi-000GN3-Kf; Tue, 13 Aug 2013 17:28:44 +0000 Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id 4CF6C6011C; Tue, 13 Aug 2013 13:28:42 -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/EoyLAArJiFVidhfMfZSSL Date: Tue, 13 Aug 2013 17:28:00 -0000 From: Christopher Faylor To: Pedro Alves , gdb-patches@sourceware.org, yao@codesourcery.com, Joel Brobecker , Eli Zaretskii Subject: Re: [PATCH] Unbuffer stdout and stderr on windows Message-ID: <20130813172842.GA7791@ednor.casa.cgf.cx> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org, yao@codesourcery.com, Joel Brobecker , Eli Zaretskii 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> <51F6C7B2.3020400@redhat.com> <20130731034045.GA5565@ednor.casa.cgf.cx> <20130812211105.GA11128@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130812211105.GA11128@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-08/txt/msg00353.txt.bz2 On Mon, Aug 12, 2013 at 02:11:05PM -0700, Joel Brobecker wrote: >> We had a somewhat heated debate in the cygwin list about using the >> techniques in winpty and eventually abandoned the idea because the way >> things like winpty create consoles is not foolproof. Since it relies on >> polling, it is theoretically possible to lose data. >> >> I'll bet that, in practice you'd never see any data loss, though. >> And, from that observation, you can see which side of the argument >> I was on. :-) > >FWIW, many frontends also implements communication with GDB using >pipes on Windows, and running MinGW-gdb inside cygwin window/shell >is just a very very common practice, regardless of whether officially >supported or not. How does Emacs do, for instance? IIRC when I looked >at the code, that's what it did. > >Having the stdout/stderr output mixed up is very confusing and breaks >testing as well, so we applied the same approach as Yao's at AdaCore. >In the many many years that we've used this approach, no one ever >complained to us about standard I/O performance. > >For completeness, our calls to setvbuf are inserted about 10 lines >later, after gdb_stdout/gdb_stderr are set up. So do you just unconditionally set gdb_std* to unbuffered? I would think that this would be nearly unnoticeable. cgf