This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Detect GDB is in cygwin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]