Push pruning old threads down to the target
[deliverable/binutils-gdb.git] / gdb / procfs.c
index 15a0409f3191b054c212cc867b8bc4881a96f02a..bd91a466f58996488c2cc6d53c8ecd1c9ee26ddf 100644 (file)
@@ -133,7 +133,7 @@ static target_xfer_partial_ftype procfs_xfer_partial;
 
 static int procfs_thread_alive (struct target_ops *ops, ptid_t);
 
-static void procfs_find_new_threads (struct target_ops *ops);
+static void procfs_update_thread_list (struct target_ops *ops);
 static char *procfs_pid_to_str (struct target_ops *, ptid_t);
 
 static int proc_find_memory_regions (struct target_ops *self,
@@ -196,7 +196,7 @@ procfs_target (void)
   t->to_files_info = procfs_files_info;
   t->to_stop = procfs_stop;
 
-  t->to_find_new_threads = procfs_find_new_threads;
+  t->to_update_thread_list = procfs_update_thread_list;
   t->to_thread_alive = procfs_thread_alive;
   t->to_pid_to_str = procfs_pid_to_str;
 
@@ -4646,7 +4646,7 @@ procfs_inferior_created (struct target_ops *ops, int from_tty)
 #endif
 }
 
-/* Callback for find_new_threads.  Calls "add_thread".  */
+/* Callback for update_thread_list.  Calls "add_thread".  */
 
 static int
 procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
@@ -4663,10 +4663,12 @@ procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
    back to GDB to add to its list.  */
 
 static void
-procfs_find_new_threads (struct target_ops *ops)
+procfs_update_thread_list (struct target_ops *ops)
 {
   procinfo *pi;
 
+  prune_threads ();
+
   /* Find procinfo for main process.  */
   pi = find_procinfo_or_die (ptid_get_pid (inferior_ptid), 0);
   proc_update_threads (pi);
This page took 0.024783 seconds and 4 git commands to generate.