Remove find_inferior
authorSimon Marchi <simon.marchi@polymtl.ca>
Sun, 3 Dec 2017 01:36:45 +0000 (20:36 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 3 Dec 2017 01:36:45 +0000 (20:36 -0500)
All the usages of find_inferior were removed, so the function itself can
be removed.

gdb/gdbserver/ChangeLog:

* inferiors.h (find_inferior): Remove.
* inferiors.c (find_inferior): Remove.

gdb/gdbserver/ChangeLog
gdb/gdbserver/inferiors.c
gdb/gdbserver/inferiors.h

index ca998dbb93d86b149012b652e81662d7bda1f150..882aff4dbbbd59befb104d09c8b9e9b745e9c4c3 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * inferiors.h (find_inferior): Remove.
+       * inferiors.c (find_inferior): Remove.
+
 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * linux-low.c (resume_status_pending_p): Update comment.
index 053f675c76047d7ca387624fd4495ad4b2bbb74c..47cc13a06f01de9e63cd74aa3b1b031f54c65dd1 100644 (file)
@@ -30,18 +30,6 @@ struct thread_info *current_thread;
 /* The current working directory used to start the inferior.  */
 static const char *current_inferior_cwd = NULL;
 
-thread_info *
-find_inferior (std::list<thread_info *> *thread_list,
-              int (*func) (thread_info *, void *),
-              void *arg)
-{
-  gdb_assert (thread_list == &all_threads);
-
-  return find_thread ([&] (thread_info *thread) {
-    return func (thread, arg);
-  });
-}
-
 void
 for_each_inferior (std::list<thread_info *> *thread_list,
                   void (*action) (thread_info *))
index 44644c2a8375589509e4b257e1fcfd2c2b6213c0..2aab846d25b2a4f5613ada056f8951f4b9603277 100644 (file)
@@ -140,8 +140,6 @@ int have_attached_inferiors_p (void);
 
 void clear_inferiors (void);
 
-thread_info *find_inferior (std::list<thread_info *> *thread_list,
-                           int (*func) (thread_info *, void *), void *arg);
 void for_each_inferior (std::list<thread_info *> *thread_list,
                        void (*action) (thread_info *));
 void for_each_inferior_with_data (std::list<thread_info *> *thread_list,