diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2017-12-02 20:37:53 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2017-12-02 20:37:53 -0500 |
commit | f004534791145669d7765f8122e48f21e1deeb94 (patch) | |
tree | 9d9b85053867184ce2574f48489b16e4be3a817f /gdb/gdbserver/inferiors.c | |
parent | 9521758bf967360fc1e18b2a2195d97ae19cb80d (diff) | |
download | binutils-gdb-f004534791145669d7765f8122e48f21e1deeb94.tar.gz |
Remove for_each_inferior
This patch removes for_each_inferior, replacing all its usages with
for_each_thread.
gdb/gdbserver/ChangeLog:
* inferiors.c (for_each_inferior): Remove.
(clear_inferiors): Use for_each_thread.
* inferiors.h (for_each_inferior): Remove.
* linux-low.c (linux_wait_for_event_filtered): Use
for_each_thread.
(linux_stabilize_threads): Likewise.
* regcache.c (regcache_release): Likewise.
* server.c (gdb_wants_all_threads_stopped): Likewise.
(clear_pending_status_callback): Remove.
(handle_status): Use for_each_thread.
(captured_main): Likewise.
* win32-low.c (child_init_thread_list): Likewise.
(win32_clear_inferiors): Likewise.
(fake_breakpoint_event): Likewise.
Diffstat (limited to 'gdb/gdbserver/inferiors.c')
-rw-r--r-- | gdb/gdbserver/inferiors.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c index 47cc13a06f0..093080dc554 100644 --- a/gdb/gdbserver/inferiors.c +++ b/gdb/gdbserver/inferiors.c @@ -31,17 +31,6 @@ struct thread_info *current_thread; static const char *current_inferior_cwd = NULL; void -for_each_inferior (std::list<thread_info *> *thread_list, - void (*action) (thread_info *)) -{ - gdb_assert (thread_list == &all_threads); - - for_each_thread ([&] (thread_info *thread) { - action (thread); - }); -} - -void for_each_inferior_with_data (std::list<thread_info *> *thread_list, void (*action) (thread_info *, void *), void *data) @@ -151,7 +140,7 @@ set_thread_regcache_data (struct thread_info *thread, struct regcache *data) void clear_inferiors (void) { - for_each_inferior (&all_threads, free_one_thread); + for_each_thread (free_one_thread); all_threads.clear (); clear_dlls (); |