const char *extra_thread_info (struct thread_info *) override;
- const char *pid_to_str (ptid_t) override;
+ std::string pid_to_str (ptid_t) override;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
ravenscar_thread_target::resume (ptid_t ptid, int step,
enum gdb_signal siggnal)
{
+ /* If we see a wildcard resume, we simply pass that on. Otherwise,
+ arrange to resume the base ptid. */
inferior_ptid = m_base_ptid;
- beneath ()->resume (m_base_ptid, step, siggnal);
+ if (ptid != minus_one_ptid)
+ ptid = m_base_ptid;
+ beneath ()->resume (ptid, step, siggnal);
}
ptid_t
ptid_t event_ptid;
inferior_ptid = m_base_ptid;
- event_ptid = beneath ()->wait (m_base_ptid, status, 0);
+ if (ptid != minus_one_ptid)
+ ptid = m_base_ptid;
+ event_ptid = beneath ()->wait (ptid, status, 0);
/* Find any new threads that might have been created, and update
inferior_ptid to the active thread.
this->update_thread_list ();
this->update_inferior_ptid ();
}
+ else
+ inferior_ptid = m_base_ptid;
return inferior_ptid;
}
void
ravenscar_thread_target::update_thread_list ()
{
- ada_build_task_list ();
-
/* Do not clear the thread list before adding the Ada task, to keep
the thread that the process stratum has included into it
(m_base_ptid) and the running thread, that may not have been included
return true;
}
-const char *
+std::string
ravenscar_thread_target::pid_to_str (ptid_t ptid)
{
- static char buf[30];
-
- snprintf (buf, sizeof (buf), "Thread %#x", (int) ptid.tid ());
- return buf;
+ return string_printf ("Thread %#x", (int) ptid.tid ());
}
void