From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] windows-nat.c: Handle CTRL_BREAK_EVENT in ctrl_c_handler
Date: Mon, 21 Sep 2009 15:24:00 -0000 [thread overview]
Message-ID: <002001ca3acf$a0d8bb40$e28a31c0$@u-strasbg.fr> (raw)
Using Ctrl-C to interrupt a running application
does not always work nicely because the application
can decide to handle Ctrl-C as a normal character.
On the contrary, Ctrl-Break always generates a
call to the installed SetConsoleCtrlHandler.
This patch allows me to interrupt a debuggee
running in another console (with 'set new-console on')
by pressing Ctrl-Break, even, if Ctrl-C has been
transformed by the debuggee as a normal char
using SetConsoleMode API function.
Pierre Muller
Pascal language support maintainer for GDB
2009-09-21 Pierre Muller <muller@ics.u-strasbg.fr>
* src/gdb/windows-nat.c (ctrl_c_handler): Also handle
CTRL_BREAK_EVENT.
Index: src/gdb/windows-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/windows-nat.c,v
retrieving revision 1.196
diff -u -p -r1.196 windows-nat.c
--- src/gdb/windows-nat.c 2 Jul 2009 17:21:07 -0000 1.196
+++ src/gdb/windows-nat.c 21 Sep 2009 14:53:38 -0000
@@ -1289,8 +1304,8 @@ ctrl_c_handler (DWORD event_type)
{
const int attach_flag = current_inferior ()->attach_flag;
- /* Only handle Ctrl-C event. Ignore others. */
- if (event_type != CTRL_C_EVENT)
+ /* Only handle Ctrl-C and Ctrl-Break events. Ignore others. */
+ if (event_type != CTRL_C_EVENT && event_type != CTRL_BREAK_EVENT)
return FALSE;
/* If the inferior and the debugger share the same console, do nothing as
next reply other threads:[~2009-09-21 15:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 15:24 Pierre Muller [this message]
2009-09-21 17:31 ` Eli Zaretskii
2009-09-22 15:35 ` Pierre Muller
2009-09-22 17:58 ` Eli Zaretskii
2009-09-22 18:05 ` Joel Brobecker
2009-09-22 22:02 ` Pierre Muller
2009-09-26 16:49 ` Eli Zaretskii
2009-09-29 7:29 ` Pierre Muller
2009-09-29 14:15 ` Joel Brobecker
2009-09-29 14:33 ` Pierre Muller
2009-09-30 20:09 ` Christopher Faylor
2009-09-30 20:13 ` Christopher Faylor
2009-09-29 18:55 ` Eli Zaretskii
2009-09-29 21:22 ` Joel Brobecker
2009-09-30 7:42 ` Pierre Muller
2009-09-21 17:37 ` Daniel Jacobowitz
2009-09-21 22:15 ` Christopher Faylor
2009-09-21 22:39 ` Pierre Muller
2009-09-22 15:49 ` Joel Brobecker
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='002001ca3acf$a0d8bb40$e28a31c0$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sourceware.org \
/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