gdbserver: Remove duplicate functions to find any thread of process
[deliverable/binutils-gdb.git] / gdb / gdbserver / server.c
index 56c6393a4e5859b88d9d22b8c78dcea42025b033..bedb87bce754248524d94639fcba9325b4dbe6d7 100644 (file)
@@ -3450,17 +3450,6 @@ gdbserver_show_disableable (FILE *stream)
       break;                                   \
     }
 
-static int
-first_thread_of (struct inferior_list_entry *entry, void *args)
-{
-  int pid = * (int *) args;
-
-  if (ptid_get_pid (entry->id) == pid)
-    return 1;
-
-  return 0;
-}
-
 static void
 kill_inferior_callback (struct inferior_list_entry *entry)
 {
@@ -4162,11 +4151,9 @@ process_serial_event (void)
                   && ptid_equal (pid_to_ptid (pid),
                                  gdb_id))
            {
-             struct thread_info *thread =
-               (struct thread_info *) find_inferior (&all_threads,
-                                                     first_thread_of,
-                                                     &pid);
-             if (!thread)
+             thread_info *thread = find_any_thread_of_pid (pid);
+
+             if (thread == NULL)
                {
                  write_enn (own_buf);
                  break;
This page took 0.034157 seconds and 4 git commands to generate.