void detach (inferior *, int) override;
ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
void resume (ptid_t, int, enum gdb_signal) override;
void mourn_inferior () override;
void detach (inferior *, int) override;
ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
void resume (ptid_t, int, enum gdb_signal) override;
void mourn_inferior () override;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
void fetch_registers (struct regcache *, int) override;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
void fetch_registers (struct regcache *, int) override;
ptid = thread_to_lwp (ptid, -2);
if (ptid.pid () == -2) /* Inactive thread. */
error (_("This version of Solaris can't start inactive threads."));
if (info_verbose && ptid.pid () == -1)
warning (_("Specified thread %ld seems to have terminated"),
ptid = thread_to_lwp (ptid, -2);
if (ptid.pid () == -2) /* Inactive thread. */
error (_("This version of Solaris can't start inactive threads."));
if (info_verbose && ptid.pid () == -1)
warning (_("Specified thread %ld seems to have terminated"),
- if (ptid_tid_p (rtnval)
- && !ptid_equal (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);
+ }
{
/* It's an LWP; pass the request on to the layer beneath. */
beneath ()->fetch_registers (regcache, regnum);
{
/* It's an LWP; pass the request on to the layer beneath. */
beneath ()->fetch_registers (regcache, regnum);
{
/* It's an LWP; pass the request on to the layer beneath. */
beneath ()->store_registers (regcache, regnum);
{
/* It's an LWP; pass the request on to the layer beneath. */
beneath ()->store_registers (regcache, regnum);
/* Identify process as 32-bit or 64-bit. At the moment we're using
BFD to do this. There might be a more Solaris-specific
(e.g. procfs) method, but this ought to work. */
/* Identify process as 32-bit or 64-bit. At the moment we're using
BFD to do this. There might be a more Solaris-specific
(e.g. procfs) method, but this ought to work. */
- xsnprintf (buf, sizeof (buf), "Thread %ld (LWP %ld)",
- ptid.tid (), lwp.lwp ());
+ return string_printf ("Thread %ld (LWP %ld)",
+ ptid.tid (), lwp.lwp ());
- 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)