diff options
author | Tom Tromey <tromey@adacore.com> | 2019-03-04 12:05:03 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-03-12 10:45:35 -0600 |
commit | d3a70e03cf51c8fb6bc183eaff7559edffec2045 (patch) | |
tree | a482ecb424eec253f95a9a065f48d8ebeb1acd70 /gdb/gdbserver | |
parent | 7a6e0d89bb018cef0d8d13c497d8f340aa2a0fc8 (diff) | |
download | gdb-d3a70e03cf51c8fb6bc183eaff7559edffec2045.zip gdb-d3a70e03cf51c8fb6bc183eaff7559edffec2045.tar.gz gdb-d3a70e03cf51c8fb6bc183eaff7559edffec2045.tar.bz2 |
Change iterate_over_lwps to take a gdb::function_view
This changes iterate_over_lwps to use a gdb::function_view. This was
needed in order to make null_ptid and minus_one_ptid 'const'.
gdb/ChangeLog
2019-03-12 Tom Tromey <tromey@adacore.com>
* linux-nat.c (iterate_over_lwps): Update.
(stop_callback): Remove parameter.
(stop_wait_callback, detach_callback, resume_set_callback)
(select_singlestep_lwp_callback, set_ignore_sigint)
(status_callback, resumed_callback, resume_clear_callback)
(kill_callback, kill_wait_callback, linux_nat_stop_lwp): Remove
data parameter.
(linux_nat_target::detach, linux_nat_target::resume)
(linux_stop_and_wait_all_lwps, select_event_lwp)
(linux_nat_filter_event, linux_nat_wait_1)
(linux_nat_target::kill, linux_nat_target::stop)
(linux_nat_target::stop): Update.
(linux_nat_resume_callback): Change type.
(resume_stopped_resumed_lwps, count_events_callback)
(select_event_lwp_callback): Likewise.
(linux_stop_lwp, linux_nat_stop_lwp): Update.
* arm-linux-nat.c (struct update_registers_data): Remove.
(update_registers_callback): Change type.
(arm_linux_insert_hw_breakpoint1): Update.
* nat/x86-linux-dregs.c (update_debug_registers_callback): Remove
parameter.
(x86_linux_dr_set_addr): Update.
(x86_linux_dr_set_control): Update.
* nat/linux-nat.h (iterate_over_lwps_ftype): Remove parameter.
(iterate_over_lwps): Use gdb::function_view.
* nat/aarch64-linux-hw-point.c (struct
aarch64_dr_update_callback_param): Remove.
(debug_reg_change_callback): Change type.
(aarch64_notify_debug_reg_change): Update.
* s390-linux-nat.c (s390_refresh_per_info): Update.
gdb/gdbserver/ChangeLog
2019-03-12 Tom Tromey <tromey@adacore.com>
* linux-low.c (iterate_over_lwps): Update.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 447b908..3eb9ec0 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Tom Tromey <tromey@adacore.com> + + * linux-low.c (iterate_over_lwps): Update. + 2019-03-06 Tom Tromey <tom@tromey.com> * server.c (detach_or_kill_for_exit_cleanup): Remove parameter. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 8c5a51f..b1a9d12 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1843,14 +1843,13 @@ num_lwps (int pid) struct lwp_info * iterate_over_lwps (ptid_t filter, - iterate_over_lwps_ftype callback, - void *data) + gdb::function_view<iterate_over_lwps_ftype> callback) { thread_info *thread = find_thread (filter, [&] (thread_info *thr_arg) { lwp_info *lwp = get_thread_lwp (thr_arg); - return callback (lwp, data); + return callback (lwp); }); if (thread == NULL) |