]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Windows gdb: Enable "set scheduler-locking on"
authorPedro Alves <pedro@palves.net>
Thu, 11 May 2023 22:07:33 +0000 (23:07 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 19 May 2025 13:12:37 +0000 (14:12 +0100)
Surprisingly (to me), enabling scheduler locking on Windows currently
fails:

 (gdb)
 set scheduler-locking on
 Target 'native' cannot support this command.

The backend itself does support scheduler-locking.  This patch
implements windows_nat_target::get_thread_control_capabilities so that
the core knows schedlocking works for this target.

Approved-By: Tom Tromey <tom@tromey.com>
Change-Id: Ie762d3768fd70e4ac398c8bcc03c3213bfa26a6a

gdb/windows-nat.c

index 1e518f46c4938d3bfd3ba950c5c6876f28036706..1197c2f8fe19d926658e2cf9c96e830c1372cfc0 100644 (file)
@@ -254,6 +254,9 @@ struct windows_nat_target final : public x86_nat_target<inf_child_target>
 
   void close () override;
 
+  thread_control_capabilities get_thread_control_capabilities () override
+  { return tc_schedlock; }
+
   void attach (const char *, int) override;
 
   bool attach_no_wait () override