Fix PR threads/19354: "info threads" error with multiple inferiors
[deliverable/binutils-gdb.git] / gdb / linux-nat.c
index af1b76450a88ddd961a96c85cf765bc440e0c686..1f9bb4720da679d8d367c4d23940a31cf95fd743 100644 (file)
@@ -3719,10 +3719,17 @@ linux_nat_thread_alive (struct target_ops *ops, ptid_t ptid)
 static void
 linux_nat_update_thread_list (struct target_ops *ops)
 {
+  struct lwp_info *lwp;
+
   /* We add/delete threads from the list as clone/exit events are
      processed, so just try deleting exited threads still in the
      thread list.  */
   delete_exited_threads ();
+
+  /* Update the processor core that each lwp/thread was last seen
+     running on.  */
+  ALL_LWPS (lwp)
+    lwp->core = linux_common_core_of_thread (lwp->ptid);
 }
 
 static char *
This page took 0.03426 seconds and 4 git commands to generate.