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: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 26 Jul 2013 12:39:59 -0700
- 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> <51F0D9D2 dot 1090804 at codesourcery dot com>
On Thu, Jul 25, 2013 at 12:54 AM, Yao Qi <yao@codesourcery.com> 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).