mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
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>
This commit is contained in:
@@ -637,14 +637,11 @@ fbsd_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf,
|
||||
return len;
|
||||
}
|
||||
|
||||
static int
|
||||
find_signalled_thread (struct thread_info *info, void *data)
|
||||
static bool
|
||||
find_signalled_thread (struct thread_info *info)
|
||||
{
|
||||
if (info->stop_signal () != GDB_SIGNAL_0
|
||||
&& info->ptid.pid () == inferior_ptid.pid ())
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
return (info->stop_signal () != GDB_SIGNAL_0
|
||||
&& info->ptid.pid () == inferior_ptid.pid ());
|
||||
}
|
||||
|
||||
/* Return a byte_vector containing the contents of a core dump note
|
||||
@@ -718,7 +715,7 @@ fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
|
||||
signalled_thr = curr_thr;
|
||||
else
|
||||
{
|
||||
signalled_thr = iterate_over_threads (find_signalled_thread, NULL);
|
||||
signalled_thr = iterate_over_threads (find_signalled_thread);
|
||||
if (signalled_thr == NULL)
|
||||
signalled_thr = curr_thr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user