From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1247 invoked by alias); 25 Jul 2013 08:26:26 -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 1222 invoked by uid 89); 25 Jul 2013 08:26:26 -0000 X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 25 Jul 2013 08:26:25 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 903195200A1; Thu, 25 Jul 2013 10:26:17 +0200 (CEST) Date: Thu, 25 Jul 2013 08:26:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] New option --cygwin-tty. Message-ID: <20130725082617.GB11021@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <1374728963-25187-1-git-send-email-yao@codesourcery.com> <1374728963-25187-2-git-send-email-yao@codesourcery.com> <000901ce8909$dd069470$9713bd50$@muller@ics-cnrs.unistra.fr> <51F0D9D2.1090804@codesourcery.com> <20130725081820.GA11021@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130725081820.GA11021@calimero.vinschen.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-07/txt/msg00603.txt.bz2 On Jul 25 10:18, Corinna Vinschen wrote: > On Jul 25 15:54, Yao Qi wrote: > > On 07/25/2013 03:37 PM, Pierre Muller wrote: > > > Instead of adding a new command line option, > > >we might change this into a new command > > >call > > > set windows-os-tty on/off > > > > > >In the testsuite, this could be > > >automated by adding "-ex {set windows-os-tty on}" > > >to INTERNAL_GDBFLAGS. > > > This is what I do to run the testsuite on > > >msys for the "set interactive-mode on" > > >command that I added a while ago to resolve a similar problem. > > > > > >This would avoid adding a target specific command line option > > >and allow to move most of the code to mingw-hdep.c source > > >where it belongs as it really is mingw specific, no? > > > > Yeah, I agree, but I am worried that stdio handlers (such as stdout) > > should be set before any writes to them, so we should set the flag > > (cygwin_tty) at the early stage of GDB start up (before command 'set > > windows-os-tty on' is processed). If it is not a problem, I am > > fine. > > You can use the _setmode() call at any time to switch text/binary mode > on the descriptors. > > > I am looking at Corinna's example to see how to detect GDB is > > running in Cygwin's TTY. If it works, probably we can get rid of > > this new GDB option completely. > > It has been tested under Mingw-w64 and VC++. If you're using Mingw.Org, > it probably needs some tweaking. ...in terms of using different header files and the definitions at the start of the example code. The source itself should then work unchanged. Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat