* gdbint.texinfo (Host Definition): Remove description of
[deliverable/binutils-gdb.git] / gdb / thread-db.c
index d989c4910ab2360835bbfe8083fe1a741a512657..45cdb7201b95b1df74cb667dfaa30407bb5d915c 100644 (file)
@@ -404,7 +404,7 @@ enable_thread_event_reporting (void)
   err = td_ta_event_addr_p (thread_agent, TD_DEATH, &notify);
   if (err != TD_OK)
     {
-      warning ("Unable to get location for thread creation breakpoint: %s",
+      warning ("Unable to get location for thread death breakpoint: %s",
               thread_db_err_str (err));
       return;
     }
@@ -573,8 +573,9 @@ attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
   tp->private = xmalloc (sizeof (struct private_thread_info));
   tp->private->lwpid = ti_p->ti_lid;
 
-  if (ti_p->ti_state == TD_THR_UNKNOWN)
-    return;/* A zombie thread that's been joined -- do not attach. */
+  if (ti_p->ti_state == TD_THR_UNKNOWN ||
+      ti_p->ti_state == TD_THR_ZOMBIE)
+    return;/* A zombie thread -- do not attach. */
 
   /* Under Linux, we have to attach to each and every thread.  */
 #ifdef ATTACH_LWP
@@ -915,8 +916,9 @@ thread_db_thread_alive (ptid_t ptid)
       if (err != TD_OK)
        return 0;
 
-      if (ti.ti_state == TD_THR_UNKNOWN)
-       return 0;       /* A zombie thread that's been joined. */
+      if (ti.ti_state == TD_THR_UNKNOWN ||
+         ti.ti_state == TD_THR_ZOMBIE)
+       return 0;       /* A zombie thread. */
 
       return 1;
     }
@@ -938,8 +940,10 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
   if (err != TD_OK)
     error ("Cannot get thread info: %s", thread_db_err_str (err));
 
-  if (ti.ti_state == TD_THR_UNKNOWN)
-    return 0;  /* A zombie that's been reaped -- ignore. */
+  if (ti.ti_state == TD_THR_UNKNOWN ||
+      ti.ti_state == TD_THR_ZOMBIE)
+
+    return 0;  /* A zombie -- ignore. */
 
   ptid = BUILD_THREAD (ti.ti_tid, GET_PID (inferior_ptid));
 
This page took 0.023999 seconds and 4 git commands to generate.