Use memmove to copy overlap memory.
[deliverable/binutils-gdb.git] / gdb / linux-thread-db.c
index 659d99d9347a95467066c6f513ff0f2af3cd9aef..2c66da7e2beba278f50232a898ee24f638e1302c 100644 (file)
@@ -1454,6 +1454,12 @@ thread_db_find_new_threads_1 (ptid_t ptid)
   thread_db_find_new_threads_2 (ptid, 0);
 }
 
+static int
+update_thread_core (struct lwp_info *info, void *closure)
+{
+  info->core = linux_nat_core_of_thread_1 (info->ptid);
+  return 0;
+}
 
 static void
 thread_db_find_new_threads (struct target_ops *ops)
@@ -1466,6 +1472,9 @@ thread_db_find_new_threads (struct target_ops *ops)
     return;
 
   thread_db_find_new_threads_1 (inferior_ptid);
+
+  iterate_over_lwps (minus_one_ptid /* iterate over all */,
+                    update_thread_core, NULL);
 }
 
 static char *
This page took 0.024066 seconds and 4 git commands to generate.