]> 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>
Fri, 24 Apr 2026 20:28:44 +0000 (21:28 +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.h

index 221ce58a887ede9a732f4b2d83091369a2174ed2..0f586cd195e4946defce46eb46aa9136c428d498 100644 (file)
@@ -115,6 +115,9 @@ struct windows_nat_target : public 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