* linux-nat.c (linux_nat_attach): Add the pid we attached to, to
[deliverable/binutils-gdb.git] / gdb / linux-thread-db.c
index 534c9b97a3f0e3ee184ec8342e59745c8d92b8df..8ac98187765ab544c00473bda731fc49ca391784 100644 (file)
@@ -918,6 +918,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
   td_thrinfo_t ti;
   td_err_e err;
   ptid_t ptid;
+  struct thread_info *tp;
 
   err = td_thr_get_info_p (th_p, &ti);
   if (err != TD_OK)
@@ -945,7 +946,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
       return 0;
     }
 
-  if (!in_thread_list (ptid))
+  tp = find_thread_pid (ptid);
+  if (tp == NULL || tp->private == NULL)
     attach_thread (ptid, th_p, &ti);
 
   return 0;
This page took 0.024081 seconds and 4 git commands to generate.