From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12061 invoked by alias); 26 Jul 2013 19:40:08 -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 12035 invoked by uid 89); 26 Jul 2013 19:40:08 -0000 X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO mail-oa0-f52.google.com) (209.85.219.52) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 26 Jul 2013 19:40:07 +0000 Received: by mail-oa0-f52.google.com with SMTP id g12so8269444oah.39 for ; Fri, 26 Jul 2013 12:40:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=T/IYfb1Vai0/RjvkncciPmWG2uefc/QficVylc3XMoM=; b=om5Me/Ze78XI/3yxYiklStg7izDv6rUKT0zI0ue5GPhf1AVRf7BiyfkTNSF7OR2whv m+2q/LohrUun4IY95L9Y7dgTeugt9MISYkPYYQKnJZBf3oPyHx4rCCNq3vW7/kITnIAf oDPZlhKs/ip9uO3gLrHwOv8V/6RTcxEI2KOoc+zydK+65qmvVUMG9rYdFGjG7hscfnL5 tOsOoaALozcCHb6mxk6mIeAegkfK50bQ5KJBqB61dRq+R1WX7kSP+fyYLppZLktrKofh gpC5fwCUnuGlZvlOHYPc6TB2KPM6264UMdV2CMyoYL/o4OYErNfgw1FxNXGNAGGyknyS deGw== MIME-Version: 1.0 X-Received: by 10.50.56.101 with SMTP id z5mr24337igp.4.1374867599865; Fri, 26 Jul 2013 12:39:59 -0700 (PDT) Received: by 10.64.239.148 with HTTP; Fri, 26 Jul 2013 12:39:59 -0700 (PDT) In-Reply-To: <51F0D9D2.1090804@codesourcery.com> References: <1374728963-25187-1-git-send-email-yao@codesourcery.com> <1374728963-25187-2-git-send-email-yao@codesourcery.com> <51F0D9D2.1090804@codesourcery.com> Date: Fri, 26 Jul 2013 19:40:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] New option --cygwin-tty. From: Doug Evans To: Yao Qi Cc: Pierre Muller , gdb-patches Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQk0OO7xekkqObp3yQbJ40MbjHK6M3jvNmGppo9MI4Knt779oP0ZcIOnIlyKhxUOkLBn6yV4FcP5STXdYI6iGIS0w7v49/T5ZePzelPm7xVccDCmlE6sHh2qRSiAymotphXPPK3HbG4SK1MAg9Q5m6JKP5996pkrR6+yqqOtM6pK9O205USs7vh5Cr1jPiFFLpo7La09oawZ8yhYyqGgvZoLlDIL9A== X-SW-Source: 2013-07/txt/msg00650.txt.bz2 On Thu, Jul 25, 2013 at 12:54 AM, 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. > > 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. As a data point, and I agree that avoiding any new option would be preferable, in addition to -ex there is also -iex which is performed earlier in the gdb startup process (before symbol files are read, for example).