OSDN Git Service

* windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT.
authorPierre Muller <muller@ics.u-strasbg.fr>
Wed, 30 Sep 2009 07:40:09 +0000 (07:40 +0000)
committerPierre Muller <muller@ics.u-strasbg.fr>
Wed, 30 Sep 2009 07:40:09 +0000 (07:40 +0000)
* doc/gdb.texinfo (Cygwin Native): Mention support for Ctrl-BREAK.

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/windows-nat.c

index 035f445..0eeec06 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-30  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT.
+
 2009-09-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * ia64-tdep.c (ia64_convert_from_func_ptr_addr): New variable buf.
index 0c6b74c..79ace1e 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-30  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * gdb.texinfo (Cygwin Native): Mention support for Ctrl-BREAK.
+
 2009-09-18  Tom Tromey  <tromey@redhat.com>
 
        * gdb.texinfo (GDB/MI Variable Objects): -enable-pretty-printing
index f16b6e2..29d6a7c 100644 (file)
@@ -15898,10 +15898,20 @@ counts of various errors encountered so far.
 @cindex Cygwin-specific commands
 
 @value{GDBN} supports native debugging of MS Windows programs, including
-DLLs with and without symbolic debugging information.  There are various
-additional Cygwin-specific commands, described in this section.
-Working with DLLs that have no debugging symbols is described in
-@ref{Non-debug DLL Symbols}.
+DLLs with and without symbolic debugging information.
+
+@cindex Ctrl-BREAK, MS-Windows
+@cindex interrupt debuggee on MS-Windows
+MS-Windows programs that call @code{SetConsoleMode} to switch off the
+special meaning of the @samp{Ctrl-C} keystroke cannot be interrupted
+by typing @kbd{C-c}.  For this reason, @value{GDBN} on MS-Windows
+supports @kbd{C-@key{BREAK}} as an alternative interrupt key
+sequence, which can be used to interrupt the debuggee even if it
+ignores @kbd{C-c}.
+
+There are various additional Cygwin-specific commands, described in
+this section.  Working with DLLs that have no debugging symbols is
+described in @ref{Non-debug DLL Symbols}.
 
 @table @code
 @kindex info w32
index c041c42..d8c2599 100644 (file)
@@ -1289,8 +1289,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