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)
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;