+2018-11-26 Pedro Alves <palves@redhat.com>
+
+ * procfs.c (procfs_notice_thread): Replace uses of
+ in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
+ * sol-thread.c (sol_thread_target::wait)
+ (sol_update_thread_list_callback): Likewise.
+
2018-11-25 Tom Tromey <tom@tromey.com>
* ui-out.c (ui_out::field_fmt): Remove comment.
{
ptid_t gdb_threadid = ptid_t (pi->pid, thread->tid, 0);
- if (!in_thread_list (gdb_threadid) || is_exited (gdb_threadid))
+ thread_info *thr = find_thread_ptid (gdb_threadid);
+ if (thr == NULL || thr->state == THREAD_EXITED)
add_thread (gdb_threadid);
return 0;
rtnval = save_ptid;
/* See if we have a new thread. */
- if (rtnval.tid_p ()
- && rtnval != save_ptid
- && (!in_thread_list (rtnval)
- || is_exited (rtnval)))
- add_thread (rtnval);
+ if (rtnval.tid_p () && rtnval != save_ptid)
+ {
+ thread_info *thr = find_thread_ptid (rtnval);
+ if (thr == NULL || thr->state == THREAD_EXITED)
+ add_thread (rtnval);
+ }
}
/* During process initialization, we may get here without the thread
{
td_err_e retval;
td_thrinfo_t ti;
- ptid_t ptid;
retval = p_td_thr_get_info (th, &ti);
if (retval != TD_OK)
return -1;
- ptid = ptid_t (inferior_ptid.pid (), 0, ti.ti_tid);
- if (!in_thread_list (ptid) || is_exited (ptid))
+ ptid_t ptid = ptid_t (inferior_ptid.pid (), 0, ti.ti_tid);
+ thread_info *thr = find_thread_ptid (ptid);
+ if (thr == NULL || thr->state == THREAD_EXITED)
add_thread (ptid);
return 0;