From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29905 invoked by alias); 29 Jul 2013 08:46:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 29878 invoked by uid 89); 29 Jul 2013 08:46:40 -0000 X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_40,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Jul 2013 08:46:39 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1V3j6A-0001JZ-OY from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 29 Jul 2013 01:46:34 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 29 Jul 2013 01:46:34 -0700 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 29 Jul 2013 01:46:34 -0700 From: Yao Qi To: Subject: [PATCH 0/3 V3] Test mingw32 GDB in cygwin Date: Mon, 29 Jul 2013 08:46:00 -0000 Message-ID: <1375087546-22591-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00691.txt.bz2 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 . *** 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