This changes the object-like macro target_can_lock_scheduler into an
inline function.
gdb/ChangeLog
2020-09-28 Tom Tromey <tom@tromey.com>
* infrun.c (set_schedlock_func): Update.
* target.h (target_can_lock_scheduler): Now a function.
+2020-09-28 Tom Tromey <tom@tromey.com>
+
+ * infrun.c (set_schedlock_func): Update.
+ * target.h (target_can_lock_scheduler): Now a function.
+
2020-09-28 Tom Tromey <tom@tromey.com>
* inferior.h (class inferior) <has_execution>: Update.
static void
set_schedlock_func (const char *args, int from_tty, struct cmd_list_element *c)
{
- if (!target_can_lock_scheduler)
+ if (!target_can_lock_scheduler ())
{
scheduler_mode = schedlock_off;
error (_("Target '%s' cannot support this command."), target_shortname);
/* Can the target support the debugger control of thread execution?
Can it lock the thread scheduler? */
-#define target_can_lock_scheduler \
- (current_top_target ()->get_thread_control_capabilities () & tc_schedlock)
+static inline bool
+target_can_lock_scheduler ()
+{
+ return (current_top_target ()->get_thread_control_capabilities ()
+ & tc_schedlock) != 0;
+}
/* Controls whether async mode is permitted. */
extern bool target_async_permitted;