aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/win32-low.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-04-08 14:33:35 -0600
committerTom Tromey <tromey@adacore.com>2020-04-08 14:47:59 -0600
commit2c1d95e8697f64713d0f60f7b9231d13a3f6a145 (patch)
tree6e6bc6f0c78b9a706f108cab3a6fcf7c9a125cf3 /gdbserver/win32-low.cc
parentd2977bc4253614907058d3a339875683d8215065 (diff)
downloadgdb-2c1d95e8697f64713d0f60f7b9231d13a3f6a145.zip
gdb-2c1d95e8697f64713d0f60f7b9231d13a3f6a145.tar.gz
gdb-2c1d95e8697f64713d0f60f7b9231d13a3f6a145.tar.bz2
Move wait_for_debug_event to nat/windows-nat.c
This moves the wait_for_debug_event helper function to nat/windows-nat.c, and changes gdbserver to use it. wait_for_debug_event is a wrapper for WaitForDebugEvent that also sets last_wait_event when appropriate. This is needed to properly handle queued stops. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (wait_for_debug_event): Move to nat/windows-nat.c. * nat/windows-nat.h (wait_for_debug_event): Declare. * nat/windows-nat.c (wait_for_debug_event): Move from windows-nat.c. No longer static. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (win32_kill, get_child_debug_event): Use wait_for_debug_event.
Diffstat (limited to 'gdbserver/win32-low.cc')
-rw-r--r--gdbserver/win32-low.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 33f6470..d151505 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -797,7 +797,7 @@ win32_process_target::kill (process_info *process)
{
if (!child_continue (DBG_CONTINUE, -1))
break;
- if (!WaitForDebugEvent (&current_event, INFINITE))
+ if (!wait_for_debug_event (&current_event, INFINITE))
break;
if (current_event.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT)
break;
@@ -1231,7 +1231,7 @@ get_child_debug_event (DWORD *continue_status,
happen is the user will see a spurious breakpoint. */
current_event.dwDebugEventCode = 0;
- if (!WaitForDebugEvent (&current_event, 0))
+ if (!wait_for_debug_event (&current_event, 0))
{
OUTMSG2(("no attach events left\n"));
fake_breakpoint_event ();
@@ -1246,7 +1246,7 @@ get_child_debug_event (DWORD *continue_status,
/* Keep the wait time low enough for comfortable remote
interruption, but high enough so gdbserver doesn't become a
bottleneck. */
- if (!WaitForDebugEvent (&current_event, 250))
+ if (!wait_for_debug_event (&current_event, 250))
{
DWORD e = GetLastError();