This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Detect GDB is in cygwin
- From: Christopher Faylor <cgf-use-the-mailinglist-please at sourceware dot org>
- To: gdb-patches at sourceware dot org, Yao Qi <yao at codesourcery dot com>
- Date: Thu, 15 Aug 2013 13:40:10 -0400
- Subject: Re: [PATCH 1/3] Detect GDB is in cygwin
- References: <83a9l4xdst dot fsf at gnu dot org> <51FA137B dot 6070207 at codesourcery dot com> <20130803045452 dot GA997 at ednor dot casa dot cgf dot cx> <51FE1493 dot 9070707 at codesourcery dot com> <20130805044122 dot GA1825 at ednor dot casa dot cgf dot cx> <51FF4483 dot 5000102 at codesourcery dot com> <20130806020839 dot GA3362 at ednor dot casa dot cgf dot cx> <520067CB dot 4000300 at codesourcery dot com> <20130808051114 dot GA1553 at ednor dot casa dot cgf dot cx> <5203477B dot 8090203 at codesourcery dot com>
On Thu, Aug 08, 2013 at 03:23:39PM +0800, Yao Qi wrote:
>On 08/08/2013 01:11 PM, Christopher Faylor wrote:
>> If you're just going to always set to unbuffered when something
>> is a pipe, why not just check for a pipe using GetFileType? Then
>> you don't have to try to use an undocumented Cygwin behaviour.
>
>What I am going to do is to set stdout/stderr unbuffered if we can
>detect that GDB is running in cygwin, with tty allocated or without tty
>allocated. We'd like to restrict this behaviour change only when
>mingw gdb is running in cygwin. We don't want to change the behaviour
>on native windows, so we have to rely on this Cygwin behaviour.
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?
Can you explain *why* you don't want to change the behavior on native
windows?
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.
cgf