err = td_ta_event_addr_p (thread_agent, TD_DEATH, ¬ify);
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;
}
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
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;
}
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));