public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3 V3] Test mingw32 GDB in cygwin
@ 2013-07-29  8:46 Yao Qi
  2013-07-29  8:46 ` [PATCH 1/3] Detect GDB is " Yao Qi
                   ` (4 more replies)
  0 siblings, 5 replies; 41+ messages in thread
From: Yao Qi @ 2013-07-29  8:46 UTC (permalink / raw)
  To: gdb-patches

This patch series try to fix the problems we've seen on running
mingw32 native for testing in cygwin.  Patch 2/3 unbuffer the
stdout and stderr, so that dejagnu/expect can match the output in
the right order.  Likewise, patch 3/3 sets stdin/stdout/stderr into
binary mode, so that dejagnu/expects can match the eol correctly
too.  In order to avoid the side effects of these changes to native
win32 platform, we need some bits to detect whether GDB is running
in cygwin.  This is what patch 1/3 tries to do, and most of
discussions are on it.

In V2, I proposed a new GDB option '--cygwin-tty' to tell GDB that
it is in cygwin.  People don't like it, and Corinna gave an example
that we can detect whether GDB is in cygwin or not.

Thanks to Corinna's example, we can know whether GDB is in cygwin
by checking the file name of handler of stdin (or stdout).  As a
result, a new option '--cygwin-tty' is avoided.  Patch 1/3 is
almost rewritten in V3.

The whole series are tested on native mingw32 GDB running in cygwin.
Test results are improved dramatically.

My plan next step would be to wrap isatty by gdb_isatty, which uses
the logic in Corinna's example to return the correct result on
cygwin pty.  I didn't include this change into this series, because
I get some exceptions when GDB starts up from time to time:

  (gdb) Exception condition detected on fd 0
  error detected on stdin

It takes time investigating and I decide to stop here.

V2 of this series can be found in
<http://sourceware.org/ml/gdb-patches/2013-07/msg00590.html>.

*** BLURB HERE ***

Yao Qi (3):
  Detect GDB is in cygwin
  Unbuffer stdout and stderr in cygwin
  Set stdin/stdout/stderr to binary mode in cygwin.

 gdb/config.in    |   15 +++++++++
 gdb/configure    |   82 +++++++++++++++++++++++++++++++++++++++++++++++++
 gdb/configure.ac |   40 ++++++++++++++++++++++++
 gdb/defs.h       |    4 ++
 gdb/main.c       |   25 +++++++++++++++
 gdb/mingw-hdep.c |   90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 256 insertions(+), 0 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 41+ messages in thread
* [PATCH 0/3 V4] Test mingw32 GDB in cygwin
@ 2013-08-13  9:35 Yao Qi
  2013-08-13  9:35 ` [PATCH 1/3] Detect GDB is " Yao Qi
  0 siblings, 1 reply; 41+ messages in thread
From: Yao Qi @ 2013-08-13  9:35 UTC (permalink / raw)
  To: gdb-patches

Hi,
Here is the V4 of this patch series, which fix problems we've seen on
running mingw32 native for testing cygwin.  V3 was reviewed in this thread 
http://sourceware.org/ml/gdb-patches/2013-07/msg00691.html by Eli mostly.
All the questions/comments were addressed, AFAIK.  However, no one
approved it explicitly.  I post them again, and call it V4, which is
identical to patches I finally posted in V3 thread.  It is sort of a
patch ping.

These patches was discussed some times (since 2009), and people think
they are useful, but unfortunately, they were not checked in since then.
There are some issues in GDB on Windows (including mingw32 and cygwin),
and Pierre has some other fixes too on top of mine.  The patch series
can be a good starting point.

Here is the description in V3, for people who don't have much context
of this series....

-----------------------------------------------------------
This patch series try to fix the problems we've seen on running
mingw32 native for testing in cygwin.  Patch 2/3 unbuffer the
stdout and stderr, so that dejagnu/expect can match the output in
the right order.  Likewise, patch 3/3 sets stdin/stdout/stderr into
binary mode, so that dejagnu/expects can match the eol correctly
too.  In order to avoid the side effects of these changes to native
win32 platform, we need some bits to detect whether GDB is running
in cygwin.  This is what patch 1/3 tries to do, and most of
discussions are on it.

In V2, I proposed a new GDB option '--cygwin-tty' to tell GDB that
it is in cygwin.  People don't like it, and Corinna gave an example
that we can detect whether GDB is in cygwin or not.

Thanks to Corinna's example, we can know whether GDB is in cygwin
by checking the file name of handler of stdin (or stdout).  As a
result, a new option '--cygwin-tty' is avoided.  Patch 1/3 is
almost rewritten in V3.

The whole series are tested on native mingw32 GDB running in cygwin.
Test results are improved dramatically.

My plan next step would be to wrap isatty by gdb_isatty, which uses
the logic in Corinna's example to return the correct result on
cygwin pty.  I didn't include this change into this series, because
I get some exceptions when GDB starts up from time to time:

  (gdb) Exception condition detected on fd 0
  error detected on stdin

It takes time investigating and I decide to stop here.

*** BLURB HERE ***

Yao Qi (3):
  Detect GDB is in cygwin
  Unbuffer stdout and stderr in cygwin
  Set stdout/stderr to binary mode in cygwin.

 gdb/config.in    |    6 +++
 gdb/configure    |   30 +++++++++++++++++
 gdb/configure.ac |    7 ++++
 gdb/defs.h       |    4 ++
 gdb/main.c       |   24 +++++++++++++
 gdb/mingw-hdep.c |   96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 167 insertions(+), 0 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2013-08-16 16:37 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-29  8:46 [PATCH 0/3 V3] Test mingw32 GDB in cygwin Yao Qi
2013-07-29  8:46 ` [PATCH 1/3] Detect GDB is " Yao Qi
2013-07-29 15:38   ` Eli Zaretskii
2013-07-30  9:27     ` Yao Qi
2013-07-30 15:33       ` Eli Zaretskii
2013-08-01  7:52         ` Yao Qi
2013-08-01 16:33           ` Eli Zaretskii
2013-08-02  2:51             ` Yao Qi
2013-08-02  6:10               ` Eli Zaretskii
2013-08-03  4:55           ` Christopher Faylor
2013-08-04  8:45             ` Yao Qi
2013-08-05  4:41               ` Christopher Faylor
2013-08-05  6:23                 ` Yao Qi
2013-08-06  2:08                   ` Christopher Faylor
2013-08-06  3:05                     ` Yao Qi
2013-08-08  5:11                       ` Christopher Faylor
2013-08-08  7:24                         ` Yao Qi
2013-08-15 17:40                           ` Christopher Faylor
2013-08-15 18:58                             ` Tom Tromey
2013-08-15 19:14                               ` Eli Zaretskii
2013-08-16  0:06                                 ` Yao Qi
2013-08-16  2:01                                   ` Tom Tromey
2013-08-16  1:07                             ` Yao Qi
2013-08-16 16:37                               ` Christopher Faylor
2013-08-08  7:28                         ` Pierre Muller
2013-08-13  8:12                           ` Yao Qi
2013-08-13  8:23                             ` Pierre Muller
2013-07-29  8:46 ` [PATCH 2/3] Unbuffer stdout and stderr " Yao Qi
2013-07-29 15:42   ` Eli Zaretskii
2013-08-01  8:06     ` Yao Qi
2013-08-01 16:36       ` Eli Zaretskii
2013-08-02  0:40         ` Yao Qi
2013-07-29  8:46 ` [PATCH 3/3] Set stdin/stdout/stderr to binary mode " Yao Qi
2013-07-29 15:44   ` Eli Zaretskii
2013-08-01  8:10     ` Yao Qi
2013-08-01 16:37       ` Eli Zaretskii
2013-07-29 14:03 ` [PATCH 0/3 V3] Test mingw32 GDB " Pierre Muller
2013-07-30  6:03   ` Yao Qi
2013-07-29 18:03 ` Tom Tromey
2013-07-29 18:43   ` Eli Zaretskii
2013-08-13  9:35 [PATCH 0/3 V4] " Yao Qi
2013-08-13  9:35 ` [PATCH 1/3] Detect GDB is " Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).