/* Solaris threads debugging interface.
- Copyright (C) 1996-2019 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of GDB.
to provide access to the Solaris user-mode thread implementation.
Solaris threads are true user-mode threads, which are invoked via
- the thr_* and pthread_* (native and POSIX respectivly) interfaces.
+ the thr_* and pthread_* (native and POSIX respectively) interfaces.
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
return buf;
}
-/* Return the libthread_db state string assicoated with STATECODE.
+/* Return the libthread_db state string associated with STATECODE.
If STATECODE is unknown, return an appropriate message. */
static const char *
/* See if we have a new thread. */
if (rtnval.tid_p () && rtnval != save_ptid)
{
- thread_info *thr = find_thread_ptid (rtnval);
+ thread_info *thr = find_thread_ptid (current_inferior (), rtnval);
if (thr == NULL || thr->state == THREAD_EXITED)
- add_thread (rtnval);
+ {
+ process_stratum_target *proc_target
+ = current_inferior ()->process_target ();
+ add_thread (proc_target, rtnval);
+ }
}
}
{
ptid_t ptid = ptid_t (inferior_ptid.pid (), lwpid, 0);
struct regcache *regcache
- = get_thread_arch_regcache (ptid, target_gdbarch ());
+ = get_thread_arch_regcache (current_inferior ()->process_target (),
+ ptid, target_gdbarch ());
target_fetch_registers (regcache, -1);
fill_gregset (regcache, (gdb_gregset_t *) gregset, -1);
{
ptid_t ptid = ptid_t (inferior_ptid.pid (), lwpid, 0);
struct regcache *regcache
- = get_thread_arch_regcache (ptid, target_gdbarch ());
+ = get_thread_arch_regcache (current_inferior ()->process_target (),
+ ptid, target_gdbarch ());
supply_gregset (regcache, (const gdb_gregset_t *) gregset);
target_store_registers (regcache, -1);
{
ptid_t ptid = ptid_t (inferior_ptid.pid (), lwpid, 0);
struct regcache *regcache
- = get_thread_arch_regcache (ptid, target_gdbarch ());
+ = get_thread_arch_regcache (current_inferior ()->process_target (),
+ ptid, target_gdbarch ());
target_fetch_registers (regcache, -1);
fill_fpregset (regcache, (gdb_fpregset_t *) fpregset, -1);
{
ptid_t ptid = ptid_t (inferior_ptid.pid (), lwpid, 0);
struct regcache *regcache
- = get_thread_arch_regcache (ptid, target_gdbarch ());
+ = get_thread_arch_regcache (current_inferior ()->process_target (),
+ ptid, target_gdbarch ());
supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset);
target_store_registers (regcache, -1);
return -1;
ptid_t ptid = ptid_t (inferior_ptid.pid (), 0, ti.ti_tid);
- thread_info *thr = find_thread_ptid (ptid);
+ thread_info *thr = find_thread_ptid (current_inferior (), ptid);
if (thr == NULL || thr->state == THREAD_EXITED)
- add_thread (ptid);
+ {
+ process_stratum_target *proc_target
+ = current_inferior ()->process_target ();
+ add_thread (proc_target, ptid);
+ }
return 0;
}
printf_filtered (" startfunc=%s",
msym.minsym
- ? MSYMBOL_PRINT_NAME (msym.minsym)
+ ? msym.minsym->print_name ()
: paddress (target_gdbarch (), ti.ti_startfunc));
}
printf_filtered (" sleepfunc=%s",
msym.minsym
- ? MSYMBOL_PRINT_NAME (msym.minsym)
+ ? msym.minsym->print_name ()
: paddress (target_gdbarch (), ti.ti_pc));
}