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: Fri, 16 Aug 2013 12:37:39 -0400
- Subject: Re: [PATCH 1/3] Detect GDB is in cygwin
- References: <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> <20130815174010 dot GB6955 at ednor dot casa dot cgf dot cx> <520D7AFC dot 9000507 at codesourcery dot com>
On Fri, Aug 16, 2013 at 09:06:04AM +0800, Yao Qi wrote:
>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 "user visible behaviour" in this case would be running gdb with a
pipe for stdin/stdout. It still isn't clear to me why it's acceptable
to change this behavior for Cygwin but not for other platforms.
The only reason I can see is that you are trying to run a testsuite over
ssh without using the -t option to ssh. That causes ssh to use pipes.
There is nothing Cygwin-specific about this behaviour. So, why wouldn't
a MinGW gdb need something similar for "putty"? Or, why wouldn't a linux
version need this behavior in similar scenarios?
>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.
No, I'm not going to document this. This isn't to improve
interoperability between Cygwin and GDB. It is to to make running MinGW
gdb under cygwin's ptys and pipes work better. The fact that you've
uncovered how Cygwin works under the hood doesn't mean that it is
something that I want to officially support.
cgf