This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] New option --cygwin-tty.
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 25 Jul 2013 10:26:17 +0200
- Subject: Re: [PATCH 1/3] New option --cygwin-tty.
- References: <1374728963-25187-1-git-send-email-yao at codesourcery dot com> <1374728963-25187-2-git-send-email-yao at codesourcery dot com> <000901ce8909$dd069470$9713bd50$ at muller@ics-cnrs.unistra.fr> <51F0D9D2 dot 1090804 at codesourcery dot com> <20130725081820 dot GA11021 at calimero dot vinschen dot de>
- Reply-to: gdb-patches at sourceware dot org
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