aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 9730377..aa531c4 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -710,7 +710,6 @@ windows_nat_target::fetch_registers (struct regcache *regcache, int r)
{
if (th->wow64_context.ContextFlags == 0)
{
- th->suspend ();
th->wow64_context.ContextFlags = CONTEXT_DEBUGGER_DR;
CHECK (Wow64GetThreadContext (th->h, &th->wow64_context));
}
@@ -720,7 +719,6 @@ windows_nat_target::fetch_registers (struct regcache *regcache, int r)
{
if (th->context.ContextFlags == 0)
{
- th->suspend ();
th->context.ContextFlags = CONTEXT_DEBUGGER_DR;
CHECK (GetThreadContext (th->h, &th->context));
}
@@ -1320,12 +1318,6 @@ windows_nat_target::windows_continue (DWORD continue_status, int id,
}
th->resume ();
}
- else
- {
- /* When single-stepping a specific thread, other threads must
- be suspended. */
- th->suspend ();
- }
std::optional<unsigned> err;
do_synchronously ([&] ()
@@ -1816,6 +1808,11 @@ windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
th->stopped_at_software_breakpoint = true;
th->pc_adjusted = false;
}
+
+ /* All-stop, suspend all threads until they are
+ explicitly resumed. */
+ for (auto &thr : windows_process.thread_list)
+ thr->suspend ();
}
return result;