thread_id_to_pid (int num)
{
struct thread_info *thread = find_thread_id (num);
+
if (thread)
return thread->ptid;
else
if (all || ptid_is_pid (ptid))
{
int any_started = 0;
+
for (tp = thread_list; tp; tp = tp->next)
if (all || ptid_get_pid (tp->ptid) == ptid_get_pid (ptid))
{
else
{
int started = 0;
+
tp = find_thread_ptid (ptid);
gdb_assert (tp);
gdb_assert (tp->state_ != THREAD_EXITED);
if (ui_out_is_mi_like_p (uiout))
{
char *state = "stopped";
+
if (tp->state_ == THREAD_RUNNING)
state = "running";
ui_out_field_string (uiout, "state", state);
{
struct current_thread_cleanup *old = arg;
struct thread_info *tp;
+
tp = find_thread_ptid (old->inferior_ptid);
if (tp)
tp->refcount--;