diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:33:35 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:47:59 -0600 |
commit | d2977bc4253614907058d3a339875683d8215065 (patch) | |
tree | 606cb0b2f1e932e05e87c79077c1dba0253616aa /gdb/nat/windows-nat.h | |
parent | e758e19c596f8d0683f6c8ca750eb4e79071523d (diff) | |
download | gdb-d2977bc4253614907058d3a339875683d8215065.zip gdb-d2977bc4253614907058d3a339875683d8215065.tar.gz gdb-d2977bc4253614907058d3a339875683d8215065.tar.bz2 |
Introduce fetch_pending_stop
This introduces a new "fetch_pending_stop" function and changes gdb to
use it. This function removes the first matching pending stop from
the list of such stops.
gdb/ChangeLog
2020-04-08 Tom Tromey <tromey@adacore.com>
* windows-nat.c (get_windows_debug_event): Use
fetch_pending_stop.
* nat/windows-nat.h (fetch_pending_stop): Declare.
* nat/windows-nat.c (fetch_pending_stop): New function.
Diffstat (limited to 'gdb/nat/windows-nat.h')
-rw-r--r-- | gdb/nat/windows-nat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 0e93165..68b72d4 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -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. */ |