From: Pierre Muller Date: Wed, 30 Sep 2009 07:40:10 +0000 (+0000) Subject: * windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT. X-Git-Tag: gdb_7_0-2009-10-06-release~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b01e0e699a4c581e27b468679c1fd3d5248bd4c2;p=thirdparty%2Fbinutils-gdb.git * windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT. * doc/gdb.texinfo (Cygwin Native): Mention support for Ctrl-BREAK. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 035f44572ab..0eeec064ab2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-09-30 Pierre Muller + + * windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT. + 2009-09-29 Jan Kratochvil * ia64-tdep.c (ia64_convert_from_func_ptr_addr): New variable buf. diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 0c6b74c61c0..79ace1e1a6a 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-09-30 Pierre Muller + + * gdb.texinfo (Cygwin Native): Mention support for Ctrl-BREAK. + 2009-09-18 Tom Tromey * gdb.texinfo (GDB/MI Variable Objects): -enable-pretty-printing diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index f16b6e2d335..29d6a7c4cd2 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -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 diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index c041c429e91..d8c2599b244 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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