Move wait_for_debug_event to nat/windows-nat.c
[binutils-gdb.git] / gdb / nat / windows-nat.h
index 0e9316577ba9efd267d6a075066c025f46bfc1e4..846fa67f407c48dec6cf1bbf79870edef26d854f 100644 (file)
@@ -22,6 +22,7 @@
 #include <windows.h>
 #include <vector>
 
+#include "gdbsupport/gdb_optional.h"
 #include "target/waitstatus.h"
 
 namespace windows_nat
@@ -231,6 +232,12 @@ extern handle_exception_result handle_exception
 
 extern bool matching_pending_stop (bool debug_events);
 
+/* See if a pending stop matches DESIRED_STOP_THREAD_ID.  If so,
+   remove it from the list of pending stops, set 'current_event', and
+   return it.  Otherwise, return an empty optional.  */
+
+extern gdb::optional<pending_stop> fetch_pending_stop (bool debug_events);
+
 /* A simple wrapper for ContinueDebugEvent that continues the last
    waited-for event.  If DEBUG_EVENTS is true, logging will be
    enabled.  */
@@ -238,6 +245,11 @@ extern bool matching_pending_stop (bool debug_events);
 extern BOOL continue_last_debug_event (DWORD continue_status,
                                       bool debug_events);
 
+/* A simple wrapper for WaitForDebugEvent that also sets
+   'last_wait_event' on success.  */
+
+extern BOOL wait_for_debug_event (DEBUG_EVENT *event, DWORD timeout);
+
 }
 
 #endif