* dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
[deliverable/binutils-gdb.git] / gdb / linux-thread-db.c
index 534c9b97a3f0e3ee184ec8342e59745c8d92b8df..83632d060c543e147dcba236335a02aa633e84b6 100644 (file)
@@ -235,7 +235,7 @@ thread_db_err_str (td_err_e err)
 static int
 have_threads_callback (struct thread_info *thread, void *dummy)
 {
-  return 1;
+  return thread->private != NULL;
 }
 
 static int
@@ -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.02526 seconds and 4 git commands to generate.