From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: gdb-patches@sourceware.org,
Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Subject: Re: [RFA] windows-nat.c: Enable processed input at startup
Date: Mon, 26 Apr 2010 18:24:00 -0000 [thread overview]
Message-ID: <20100426182401.GB4552@ednor.casa.cgf.cx> (raw)
In-Reply-To: <006f01cae557$d081bf80$71853e80$@muller@ics-cnrs.unistra.fr>
On Mon, Apr 26, 2010 at 05:47:45PM +0200, Pierre Muller wrote:
>> >> setting was global.
>> > Of course I should close the handle as soon as I changed the
>> >console mode.
>> > What about this version?
>> >
>> >Pierre
>> >
>> >2010-04-26 Pierre Muller <muller@ics.u-strasbg.fr>
>> >
>> > * windows-nat.c (_initialize_windows_nat): Try to set
>> > ENABLE_PROCESSED_INPUT for console mode if accessible.
>>
>> Ok with the minor comment changes below.
> Did you mean something to change to the comments
>inside the patch?
>
>> I don't understand why this would be necessary for Cygwin but,
>
> Did you try the example code I sent to gdb mailing list?
> This executable does change the Console Mode of a Cygwin tty
>and that change is kept after the program exits.
> This is not the case for a usual Windows command prompt.
> If you compile my program and run it.
>./test
>New console mode is 0x18
> (interrupting this works for both Ctrl-C and Ctrl-Break)
>but if you now run
>gdb gdb
>....
>(gdb) set prompt top>
>
>top> run
>...
>Try to hit Ctrl-C now, nothing happens
>(exit using q)
>Run again my test program with an argument:
>./test 1
>New console mode is 0x19
>Do the same...
>This time Ctrl-C works.
How is this a cygwin-specific problem? You can do the similar things on
linux by resetting CTRL-C handling. Does gdb accommodate that? If so,
then whatever works for linux should work for Cygwin.
>>if it is, then tcsetattr should be used.
>
From winsup/cygwin/fhanlde_console.cc I suppose that I should use
>tcsetattr (tcgetattr (h) | ISIG, h); But what should the variable 'h'
>be be initialized?
Uh, what? You can't call a lowlevel Cygwin function from outside of the
DLL. You'd need to use the tcsetattr API. Again, this would be similar
to the way UNIX/Linux handle it and I would think that Cygwin would be
able to use whatever code they use.
cgf
prev parent reply other threads:[~2010-04-26 18:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 11:41 Pierre Muller
2010-04-26 14:32 ` Christopher Faylor
2010-04-26 15:07 ` Pierre Muller
2010-04-26 15:20 ` Christopher Faylor
2010-04-26 15:47 ` Pierre Muller
2010-04-26 18:24 ` Christopher Faylor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100426182401.GB4552@ednor.casa.cgf.cx \
--to=cgf-use-the-mailinglist-please@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox