Make target_ops::has_execution take an 'inferior *' instead of a ptid_t
[deliverable/binutils-gdb.git] / gdb / inferior.c
index 87df193ac392eef2fc2882c1681611057ddc6b07..3969ace13a848a411b6944ef45cf9cbfe0f7fcf8 100644 (file)
@@ -1,6 +1,6 @@
 /* Multi-process control for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2019 Free Software Foundation, Inc.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -247,6 +247,7 @@ inferior_appeared (struct inferior *inf, int pid)
 {
   /* If this is the first inferior with threads, reset the global
      thread id.  */
+  delete_exited_threads ();
   if (!any_thread_p ())
     init_thread_list ();
 
@@ -344,7 +345,7 @@ number_of_live_inferiors (void)
   int num_inf = 0;
 
   for (inferior *inf : all_non_exited_inferiors ())
-    if (target_has_execution_1 (ptid_t (inf->pid)))
+    if (inf->has_execution ())
       for (thread_info *tp ATTRIBUTE_UNUSED : inf->non_exited_threads ())
        {
          /* Found a live thread in this inferior, go to the next
This page took 0.025391 seconds and 4 git commands to generate.