This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] New option --cygwin-tty.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]