X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Finferiors.c;h=ad3df648f5b1c90c6d5d20c68ee89b0c02133d21;hb=de6242d3075700ec4b73bdee583dc216f3a0b046;hp=47cc13a06f01de9e63cd74aa3b1b031f54c65dd1;hpb=9521758bf967360fc1e18b2a2195d97ae19cb80d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c index 47cc13a06f..ad3df648f5 100644 --- a/gdb/gdbserver/inferiors.c +++ b/gdb/gdbserver/inferiors.c @@ -1,5 +1,5 @@ /* Inferior process information for the remote server for GDB. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. Contributed by MontaVista Software. @@ -30,29 +30,6 @@ struct thread_info *current_thread; /* The current working directory used to start the inferior. */ static const char *current_inferior_cwd = NULL; -void -for_each_inferior (std::list *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_list, - void (*action) (thread_info *, void *), - void *data) -{ - gdb_assert (thread_list == &all_threads); - - for_each_thread ([&] (thread_info *thread) { - action (thread, data); - }); -} - struct thread_info * add_thread (ptid_t thread_id, void *target_data) { @@ -151,7 +128,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 (); @@ -236,18 +213,6 @@ current_process (void) return get_thread_process (current_thread); } -static void -do_restore_current_thread_cleanup (void *arg) -{ - current_thread = (struct thread_info *) arg; -} - -struct cleanup * -make_cleanup_restore_current_thread (void) -{ - return make_cleanup (do_restore_current_thread_cleanup, current_thread); -} - /* See common/common-gdbthread.h. */ void