diff options
author | Tom Tromey <tom@tromey.com> | 2025-02-25 07:56:55 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2025-03-11 08:39:58 -0600 |
commit | 58984e4ad22ac8bb8774b338625595ad9f6f55e9 (patch) | |
tree | 7136dbef89ee0cb08a72ab01adae76d410467980 /gdb/infrun.c | |
parent | d8a30dd2a692053165ff3dfad1e93164180fc974 (diff) | |
download | binutils-58984e4ad22ac8bb8774b338625595ad9f6f55e9.zip binutils-58984e4ad22ac8bb8774b338625595ad9f6f55e9.tar.gz binutils-58984e4ad22ac8bb8774b338625595ad9f6f55e9.tar.bz2 |
Use gdb::function_view in iterate_over_threads
This C++-ifies iterate_over_threads, changing it to accept a
gdb::function_view and to return bool.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 79fa31e..9f5b3d4 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -6671,9 +6671,8 @@ restart_threads (struct thread_info *event_thread, inferior *inf) /* Callback for iterate_over_threads. Find a resumed thread that has a pending waitstatus. */ -static int -resumed_thread_with_pending_status (struct thread_info *tp, - void *arg) +static bool +resumed_thread_with_pending_status (struct thread_info *tp) { return tp->resumed () && tp->has_pending_waitstatus (); } @@ -6751,8 +6750,7 @@ finish_step_over (struct execution_control_state *ecs) if (ecs->ws.kind () == TARGET_WAITKIND_THREAD_EXITED) return 0; - pending = iterate_over_threads (resumed_thread_with_pending_status, - nullptr); + pending = iterate_over_threads (resumed_thread_with_pending_status); if (pending != nullptr) { struct thread_info *tp = ecs->event_thread; |