From e758e19c596f8d0683f6c8ca750eb4e79071523d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 8 Apr 2020 14:33:35 -0600 Subject: Share some inferior-related Windows code This adds a couple of functions to nat/windows-nat.c and changes gdb and gdbserver to use them. One function checks the list of pending stops for a match (not yet used by gdbserver, but will be in a subsequent patch); and the other is a wrapper for ContinueDebugEvent that always uses the last "real" stop event. gdb/ChangeLog 2020-04-08 Tom Tromey * windows-nat.c (windows_continue): Use matching_pending_stop and continue_last_debug_event. * nat/windows-nat.h (matching_pending_stop) (continue_last_debug_event): Declare. * nat/windows-nat.c (DEBUG_EVENTS): New define. (matching_pending_stop, continue_last_debug_event): New functions. gdbserver/ChangeLog 2020-04-08 Tom Tromey * win32-low.c (child_continue): Call continue_last_debug_event. --- gdbserver/ChangeLog | 4 ++++ gdbserver/win32-low.cc | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'gdbserver') diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index a00176a..6793795 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,5 +1,9 @@ 2020-04-08 Tom Tromey + * win32-low.c (child_continue): Call continue_last_debug_event. + +2020-04-08 Tom Tromey + * win32-low.c (handle_exception): Remove. (windows_nat::handle_ms_vc_exception): New function. (get_child_debug_event): Add "continue_status" parameter. diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 7018083..33f6470 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -433,12 +433,7 @@ child_continue (DWORD continue_status, int thread_id) }); faked_breakpoint = 0; - if (!ContinueDebugEvent (current_event.dwProcessId, - current_event.dwThreadId, - continue_status)) - return FALSE; - - return TRUE; + return continue_last_debug_event (continue_status, debug_threads); } /* Fetch register(s) from the current thread context. */ -- cgit v1.1