Per-inferior thread list, thread ranges/iterators, down with ALL_THREADS, etc.
[deliverable/binutils-gdb.git] / gdb / linux-tdep.c
index ecdb9281893e5cd1483f463d9f7ea5e745bf1312..51fe0375be80c070e013a14860700cc88954b81a 100644 (file)
@@ -1913,7 +1913,7 @@ linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
   struct linux_corefile_thread_data thread_args;
   struct elf_internal_linux_prpsinfo prpsinfo;
   char *note_data = NULL;
-  struct thread_info *curr_thr, *signalled_thr, *thr;
+  struct thread_info *curr_thr, *signalled_thr;
 
   if (! gdbarch_iterate_over_regset_sections_p (gdbarch))
     return NULL;
@@ -1962,12 +1962,10 @@ linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
   thread_args.stop_signal = signalled_thr->suspend.stop_signal;
 
   linux_corefile_thread (signalled_thr, &thread_args);
-  ALL_NON_EXITED_THREADS (thr)
+  for (thread_info *thr : current_inferior ()->non_exited_threads ())
     {
       if (thr == signalled_thr)
        continue;
-      if (thr->ptid.pid () != inferior_ptid.pid ())
-       continue;
 
       linux_corefile_thread (thr, &thread_args);
     }
This page took 0.030695 seconds and 4 git commands to generate.