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: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 16 Aug 2013 09:06:04 +0800
- 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> <20130815174010 dot GB6955 at ednor dot casa dot cgf dot cx>
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 original problem this patch series want to address is about testing
mingw32 native gdb in cygwin. This patch series can make
dejagnu/testsuite happy, and improve the test result dramatically
(without this patch series, the result is unusable at all).
If Pierre or some one else thinks we need changes here on native
windows, that is fine, let us do it. There are many issues for mingw,
cygwin and windows, and it is impossible to fix all of them in one patch
series. This patch series make some progresses and Pierre's incoming
RCF will make some progresses too, isn't it what we want?
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.
GDB has been relying on undocumented behaviours here and there.
'grep "no.*document" *.c" may find some. If the file name pattern of
ptys and pipes are changed some day, we can update the code here to
match, which is not difficult, IMO.
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.
--
Yao (éå)