[binutils-gdb] Windows gdb: Always non-stop (default to "maint set target-non-stop on")
Pedro Alves via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=359e280316fe8e549ebf274e32306553741f176b commit 359e280316fe8e549ebf274e32306553741f176b Author: Pedro Alves <[email protected]> Date: Fri May 16 21:11:08 2025 +0100 Windows gdb: Always non-stop (default to "maint set target-non-stop on") Since having the target backend work in non-stop mode adds features compared to old all-stop mode (signal/exception passing/suppression is truly per-thread), this switches the backend to do all-stop-on-top-of-non-stop, by having windows_nat_target::always_non_stop_p return true if non-stop mode is possible. To be clear, this just changes how the backend works in coordination with infrun. The user-visible mode default mode is still all-stop. The difference is that infrun is responsible for stopping all threads when needed, instead of the backend (actually the kernel) always doing that before reporting an event to infrun. Approved-By: Tom Tromey <[email protected]> Change-Id: I83d23dbb1edc7692d5d8b37f5b9e0264c74d4940 commit-id:6f7924dc Diff: --- gdb/windows-nat.c | 9 +++++++++ gdb/windows-nat.h | 1 + 2 files changed, 10 insertions(+) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 638e87f6f60..a9647e90bb8 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -3376,6 +3376,15 @@ windows_nat_target::supports_non_stop () return dbg_reply_later_available (); } +/* Implementation of the target_ops::always_non_stop_p method. */ + +bool +windows_nat_target::always_non_stop_p () +{ + /* If we can do non-stop, prefer it. */ + return supports_non_stop (); +} + INIT_GDB_FILE (windows_nat) { #ifdef __CYGWIN__ diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h index 2d6981ada0b..1f7ecb07e4f 100644 --- a/gdb/windows-nat.h +++ b/gdb/windows-nat.h @@ -256,6 +256,7 @@ struct windows_nat_target : public inf_child_target } bool supports_non_stop () override; + bool always_non_stop_p () override; void async (bool enable) override;