This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gdbserver/win32] (6/11) Make the new interrupt method the default


Hi,

This patch makes the new interrupt method the only method
used to handle interrupt requests.  This affects only
9x/NT, since WinCE will always fallback to the new method.

This was Leo's original intention, so here it is, splitted
from his original patch.

Cheers,
Pedro Alves



2007-11-12  Leo Zayas  <lerele@champenstudios@com>
	    Pedro Alves  <pedro_alves@portugalmail.pt>

	* win32-low.c (win32_request_interrupt): Always handle interrupt
	requests by suspending all the threads programatically.

---
 gdb/gdbserver/win32-low.c |   27 ---------------------------
 1 file changed, 27 deletions(-)

Index: src/gdb/gdbserver/win32-low.c
===================================================================
--- src.orig/gdb/gdbserver/win32-low.c	2007-11-12 00:20:16.000000000 +0000
+++ src/gdb/gdbserver/win32-low.c	2007-11-12 00:20:20.000000000 +0000
@@ -1709,33 +1709,6 @@ win32_write_inferior_memory (CORE_ADDR m
 static void
 win32_request_interrupt (void)
 {
-  winapi_DebugBreakProcess DebugBreakProcess;
-  winapi_GenerateConsoleCtrlEvent GenerateConsoleCtrlEvent;
-
-#ifdef _WIN32_WCE
-  HMODULE dll = GetModuleHandle (_T("COREDLL.DLL"));
-#else
-  HMODULE dll = GetModuleHandle (_T("KERNEL32.DLL"));
-#endif
-
-  GenerateConsoleCtrlEvent = GETPROCADDRESS (dll, GenerateConsoleCtrlEvent);
-
-  if (GenerateConsoleCtrlEvent != NULL
-      && GenerateConsoleCtrlEvent (CTRL_BREAK_EVENT, current_process_id))
-    return;
-
-  /* GenerateConsoleCtrlEvent can fail if process id being debugged is
-     not a process group id.
-     Fallback to XP/Vista 'DebugBreakProcess', which generates a
-     breakpoint exception in the interior process.  */
-
-  DebugBreakProcess = GETPROCADDRESS (dll, DebugBreakProcess);
-
-  if (DebugBreakProcess != NULL
-      && DebugBreakProcess (current_process_handle))
-    return;
-
-  /* Last resort, suspend all threads manually.  */
   soft_interrupt_requested = 1;
 }
 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]