to provide access to the Solaris user-mode thread implementation.
Solaris threads are true user-mode threads, which are invoked via
to provide access to the Solaris user-mode thread implementation.
Solaris threads are true user-mode threads, which are invoked via
These are mostly implemented in user-space, with all thread context
kept in various structures that live in the user's heap. These
should not be confused with lightweight processes (LWPs), which are
These are mostly implemented in user-space, with all thread context
kept in various structures that live in the user's heap. These
should not be confused with lightweight processes (LWPs), which are
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;
single step it. If SIGNAL is nonzero, restart it with that signal
activated. We may have to convert PTID from a thread ID to an LWP
ID for procfs. */
single step it. If SIGNAL is nonzero, restart it with that signal
activated. We may have to convert PTID from a thread ID to an LWP
ID for procfs. */
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 (rtnval.tid_p ()
- && !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);
+ }
/* 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)