GDB (xrefs)

Classes | Macros | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/sol-thread.c File Reference
`#include "defs.h"`
`#include <thread.h>`
`#include <proc_service.h>`
`#include <thread_db.h>`
`#include "gdbthread.h"`
`#include "target.h"`
`#include "inferior.h"`
`#include <fcntl.h>`
`#include <sys/stat.h>`
`#include <dlfcn.h>`
`#include "gdbcmd.h"`
`#include "gdbcore.h"`
`#include "regcache.h"`
`#include "solib.h"`
`#include "symfile.h"`
`#include "observer.h"`
`#include "procfs.h"`
`#include "symtab.h"`
`#include "minsyms.h"`
`#include "objfiles.h"`
`#include "gregset.h"`

Go to the source code of this file.

## Classes
struct | ps_prochandle
struct | string_map

## Macros
#define | resolve(X)

## Typedefs
typedef void() | td_log_ftype(const int on_off)
typedef td_err_e() | td_ta_new_ftype(const struct ps_prochandle *ph_p, td_thragent_t **ta_pp)
typedef td_err_e() | td_ta_delete_ftype(td_thragent_t *ta_p)
typedef td_err_e() | td_init_ftype(void)
typedef td_err_e() | td_ta_get_ph_ftype(const td_thragent_t *ta_p, struct ps_prochandle **ph_pp)
typedef td_err_e() | td_ta_get_nthreads_ftype(const td_thragent_t *ta_p, int *nthread_p)
typedef td_err_e() | td_ta_tsd_iter_ftype(const td_thragent_t *ta_p, td_key_iter_f *cb, void *cbdata_p)
typedef td_err_e() | td_ta_thr_iter_ftype(const td_thragent_t *ta_p, td_thr_iter_f *cb, void *cbdata_p, td_thr_state_e state, int ti_pri, sigset_t *ti_sigmask_p, unsigned ti_user_flags)
typedef td_err_e() | td_thr_validate_ftype(const td_thrhandle_t *th_p)
typedef td_err_e() | td_thr_tsd_ftype(const td_thrhandle_t *th_p, const thread_key_t key, void **data_pp)
typedef td_err_e() | td_thr_get_info_ftype(const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
typedef td_err_e() | td_thr_getfpregs_ftype(const td_thrhandle_t *th_p, prfpregset_t *fpregset)
typedef td_err_e() | td_thr_getxregsize_ftype(const td_thrhandle_t *th_p, int *xregsize)
typedef td_err_e() | td_thr_getxregs_ftype(const td_thrhandle_t *th_p, const caddr_t xregset)
typedef td_err_e() | td_thr_sigsetmask_ftype(const td_thrhandle_t *th_p, const sigset_t ti_sigmask)
typedef td_err_e() | td_thr_setprio_ftype(const td_thrhandle_t *th_p, const int ti_pri)
typedef td_err_e() | td_thr_setsigpending_ftype(const td_thrhandle_t *th_p, const uchar_t ti_pending_flag, const sigset_t ti_pending)
typedef td_err_e() | td_thr_setfpregs_ftype(const td_thrhandle_t *th_p, const prfpregset_t *fpregset)
typedef td_err_e() | td_thr_setxregs_ftype(const td_thrhandle_t *th_p, const caddr_t xregset)
typedef td_err_e() | td_ta_map_id2thr_ftype(const td_thragent_t *ta_p, thread_t tid, td_thrhandle_t *th_p)
typedef td_err_e() | td_ta_map_lwp2thr_ftype(const td_thragent_t *ta_p, lwpid_t lwpid, td_thrhandle_t *th_p)
typedef td_err_e() | td_thr_getgregs_ftype(const td_thrhandle_t *th_p, prgregset_t regset)
typedef td_err_e() | td_thr_setgregs_ftype(const td_thrhandle_t *th_p, const prgregset_t regset)

## Functions
static void | init_sol_thread_ops (void)
static const char * | td_err_string (td_err_e errcode)
static const char * | td_state_string (td_thr_state_e statecode)
static ptid_t | thread_to_lwp (ptid_t thread_id, int default_lwp)
static ptid_t | lwp_to_thread (ptid_t lwp)
static void | sol_thread_detach (struct target_ops *ops, const char *args, int from_tty)
static void | sol_thread_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signo)
static ptid_t | sol_thread_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int options)
static void | sol_thread_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static void | sol_thread_store_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static enum target_xfer_status | sol_thread_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
static void | check_for_thread_db (void)
static void | sol_thread_new_objfile (struct objfile *objfile)
static void | sol_thread_mourn_inferior (struct target_ops *ops)
static int | sol_thread_alive (struct target_ops *ops, ptid_t ptid)
ps_err_e | ps_pstop (struct ps_prochandle *ph)
ps_err_e | ps_pcontinue (struct ps_prochandle *ph)
ps_err_e | ps_lstop (struct ps_prochandle *ph, lwpid_t lwpid)
ps_err_e | ps_lcontinue (struct ps_prochandle *ph, lwpid_t lwpid)
ps_err_e | ps_pglobal_lookup (struct ps_prochandle *ph, const char *ld_object_name, const char *ld_symbol_name, psaddr_t *ld_symbol_addr)
static ps_err_e | rw_common (int dowrite, const struct ps_prochandle *ph, psaddr_t addr, gdb_byte *buf, int size)
ps_err_e | ps_pdread (struct ps_prochandle *ph, psaddr_t addr, void *buf, size_t size)
ps_err_e | ps_pdwrite (struct ps_prochandle *ph, psaddr_t addr, const void *buf, size_t size)
ps_err_e | ps_ptread (struct ps_prochandle *ph, psaddr_t addr, void *buf, size_t size)
ps_err_e | ps_ptwrite (struct ps_prochandle *ph, psaddr_t addr, const void *buf, size_t size)
ps_err_e | ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, prgregset_t gregset)
ps_err_e | ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid, const prgregset_t gregset)
void | ps_plog (const char *fmt,...)
ps_err_e | ps_lgetxregsize (struct ps_prochandle *ph, lwpid_t lwpid, int *xregsize)
ps_err_e | ps_lgetxregs (struct ps_prochandle *ph, lwpid_t lwpid, caddr_t xregset)
ps_err_e | ps_lsetxregs (struct ps_prochandle *ph, lwpid_t lwpid, caddr_t xregset)
ps_err_e | ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, prfpregset_t *fpregset)
ps_err_e | ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, const prfpregset_t *fpregset)
static const char * | solaris_pid_to_str (struct target_ops *ops, ptid_t ptid)
static int | sol_update_thread_list_callback (const td_thrhandle_t *th, void *ignored)
static void | sol_update_thread_list (struct target_ops *ops)
static int | info_cb (const td_thrhandle_t *th, void *s)
static void | info_solthreads (const char *args, int from_tty)
static int | thread_db_find_thread_from_tid (struct thread_info *thread, void *data)
static ptid_t | sol_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
void | _initialize_sol_thread (void)

## Variables
struct target_ops | sol_thread_ops
static struct ps_prochandle | main_ph
static td_thragent_t * | main_ta
static int | sol_thread_active = 0
static td_log_ftype * | p_td_log
static td_ta_new_ftype * | p_td_ta_new
static td_ta_delete_ftype * | p_td_ta_delete
static td_init_ftype * | p_td_init
static td_ta_get_ph_ftype * | p_td_ta_get_ph
static td_ta_get_nthreads_ftype * | p_td_ta_get_nthreads
static td_ta_tsd_iter_ftype * | p_td_ta_tsd_iter
static td_ta_thr_iter_ftype * | p_td_ta_thr_iter
static td_thr_validate_ftype * | p_td_thr_validate
static td_thr_tsd_ftype * | p_td_thr_tsd
static td_thr_get_info_ftype * | p_td_thr_get_info
static td_thr_getfpregs_ftype * | p_td_thr_getfpregs
static td_thr_getxregsize_ftype * | p_td_thr_getxregsize
static td_thr_getxregs_ftype * | p_td_thr_getxregs
static td_thr_sigsetmask_ftype * | p_td_thr_sigsetmask
static td_thr_setprio_ftype * | p_td_thr_setprio
static td_thr_setsigpending_ftype * | p_td_thr_setsigpending
static td_thr_setfpregs_ftype * | p_td_thr_setfpregs
static td_thr_setxregs_ftype * | p_td_thr_setxregs
static td_ta_map_id2thr_ftype * | p_td_ta_map_id2thr
static td_ta_map_lwp2thr_ftype * | p_td_ta_map_lwp2thr
static td_thr_getgregs_ftype * | p_td_thr_getgregs
static td_thr_setgregs_ftype * | p_td_thr_setgregs

## Macro Definition Documentation

## ◆ resolve

#define resolve | ( |  | X | ) |

Value:
if (!(p_##X = (X ## _ftype *) dlsym (dlhandle, #X))) \
goto die;
X
Definition: ia64-tdep.c:85

Referenced by _initialize_sol_thread().

## Typedef Documentation

## ◆ td_init_ftype

typedef td_err_e() td_init_ftype(void)

Definition at line 107 of file sol-thread.c.

## ◆ td_log_ftype

typedef void() td_log_ftype(const int on_off)

Definition at line 103 of file sol-thread.c.

## ◆ td_ta_delete_ftype

typedef td_err_e() td_ta_delete_ftype(td_thragent_t *ta_p)

Definition at line 106 of file sol-thread.c.

## ◆ td_ta_get_nthreads_ftype

typedef td_err_e() td_ta_get_nthreads_ftype(const td_thragent_t *ta_p, int *nthread_p)

Definition at line 110 of file sol-thread.c.

## ◆ td_ta_get_ph_ftype

typedef td_err_e() td_ta_get_ph_ftype(const td_thragent_t *ta_p, struct ps_prochandle **ph_pp)

Definition at line 108 of file sol-thread.c.

## ◆ td_ta_map_id2thr_ftype

typedef td_err_e() td_ta_map_id2thr_ftype(const td_thragent_t *ta_p, thread_t tid, td_thrhandle_t *th_p)

Definition at line 141 of file sol-thread.c.

## ◆ td_ta_map_lwp2thr_ftype

typedef td_err_e() td_ta_map_lwp2thr_ftype(const td_thragent_t *ta_p, lwpid_t lwpid, td_thrhandle_t *th_p)

Definition at line 144 of file sol-thread.c.

## ◆ td_ta_new_ftype

typedef td_err_e() td_ta_new_ftype(const struct ps_prochandle *ph_p, td_thragent_t **ta_pp)

Definition at line 104 of file sol-thread.c.

## ◆ td_ta_thr_iter_ftype

typedef td_err_e() td_ta_thr_iter_ftype(const td_thragent_t *ta_p, td_thr_iter_f *cb, void *cbdata_p, td_thr_state_e state, int ti_pri, sigset_t *ti_sigmask_p, unsigned ti_user_flags)

Definition at line 114 of file sol-thread.c.

## ◆ td_ta_tsd_iter_ftype

typedef td_err_e() td_ta_tsd_iter_ftype(const td_thragent_t *ta_p, td_key_iter_f *cb, void *cbdata_p)

Definition at line 112 of file sol-thread.c.

## ◆ td_thr_get_info_ftype

typedef td_err_e() td_thr_get_info_ftype(const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)

Definition at line 122 of file sol-thread.c.

## ◆ td_thr_getfpregs_ftype

typedef td_err_e() td_thr_getfpregs_ftype(const td_thrhandle_t *th_p, prfpregset_t *fpregset)

Definition at line 124 of file sol-thread.c.

## ◆ td_thr_getgregs_ftype

typedef td_err_e() td_thr_getgregs_ftype(const td_thrhandle_t *th_p, prgregset_t regset)

Definition at line 147 of file sol-thread.c.

## ◆ td_thr_getxregs_ftype

typedef td_err_e() td_thr_getxregs_ftype(const td_thrhandle_t *th_p, const caddr_t xregset)

Definition at line 128 of file sol-thread.c.

## ◆ td_thr_getxregsize_ftype

typedef td_err_e() td_thr_getxregsize_ftype(const td_thrhandle_t *th_p, int *xregsize)

Definition at line 126 of file sol-thread.c.

## ◆ td_thr_setfpregs_ftype

typedef td_err_e() td_thr_setfpregs_ftype(const td_thrhandle_t *th_p, const prfpregset_t *fpregset)

Definition at line 137 of file sol-thread.c.

## ◆ td_thr_setgregs_ftype

typedef td_err_e() td_thr_setgregs_ftype(const td_thrhandle_t *th_p, const prgregset_t regset)

Definition at line 149 of file sol-thread.c.

## ◆ td_thr_setprio_ftype

typedef td_err_e() td_thr_setprio_ftype(const td_thrhandle_t *th_p, const int ti_pri)

Definition at line 132 of file sol-thread.c.

## ◆ td_thr_setsigpending_ftype

typedef td_err_e() td_thr_setsigpending_ftype(const td_thrhandle_t *th_p, const uchar_t ti_pending_flag, const sigset_t ti_pending)

Definition at line 134 of file sol-thread.c.

## ◆ td_thr_setxregs_ftype

typedef td_err_e() td_thr_setxregs_ftype(const td_thrhandle_t *th_p, const caddr_t xregset)

Definition at line 139 of file sol-thread.c.

## ◆ td_thr_sigsetmask_ftype

typedef td_err_e() td_thr_sigsetmask_ftype(const td_thrhandle_t *th_p, const sigset_t ti_sigmask)

Definition at line 130 of file sol-thread.c.

## ◆ td_thr_tsd_ftype

typedef td_err_e() td_thr_tsd_ftype(const td_thrhandle_t *th_p, const thread_key_t key, void **data_pp)

Definition at line 120 of file sol-thread.c.

## ◆ td_thr_validate_ftype

typedef td_err_e() td_thr_validate_ftype(const td_thrhandle_t *th_p)

Definition at line 119 of file sol-thread.c.

## Function Documentation

## ◆ _initialize_sol_thread()

void _initialize_sol_thread | ( | void |  | ) |

Definition at line 1188 of file sol-thread.c.

References _, add_cmd(), class_maintenance, complete_target_initialization(), fprintf_unfiltered(), gdb_stderr, info_solthreads(), init_sol_thread_ops(), maintenanceinfolist, observer_attach_new_objfile(), resolve, sol_thread_new_objfile(), sol_thread_ops, td_init(), td_log(), td_ta_delete(), td_ta_get_nthreads(), td_ta_get_ph(), td_ta_map_id2thr(), td_ta_map_lwp2thr(), td_ta_new(), td_ta_thr_iter(), td_ta_tsd_iter(), td_thr_get_info(), td_thr_getfpregs(), td_thr_getgregs(), td_thr_getxregs(), td_thr_getxregsize(), td_thr_setfpregs(), td_thr_setgregs(), td_thr_setprio(), td_thr_setsigpending(), td_thr_setxregs(), td_thr_sigsetmask(), td_thr_tsd(), and td_thr_validate().

## ◆ check_for_thread_db()

static void check_for_thread_db | ( | void |  | ) |
| static

Definition at line 585 of file sol-thread.c.

References _, core_bfd, current_target, err, inferior_ptid, lwp_to_thread(), main_ph, main_ta, p_td_init, p_td_ta_new, printf_unfiltered(), ps_prochandle::ptid, ptid_get_pid(), push_target(), sol_thread_active, sol_thread_ops, target_can_run, target_update_thread_list(), td_err_string(), TD_NOLIBTHREAD, TD_OK, and warning().

Referenced by sol_thread_new_objfile().

## ◆ info_cb()

static int info_cb | ( | const td_thrhandle_t * | th,
|  | void * | s
| ) |  |
| static

Definition at line 1053 of file sol-thread.c.

References _, lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, MSYMBOL_PRINT_NAME, p_td_thr_get_info, paddress(), printf_filtered(), target_gdbarch(), TD_OK, TD_THR_ACTIVE, TD_THR_RUN, TD_THR_SLEEP, TD_THR_STOPPED, TD_THR_STOPPED_ASLEEP, TD_THR_SYSTEM, TD_THR_UNKNOWN, TD_THR_ZOMBIE, td_thrinfo::ti_lid, td_thrinfo::ti_pc, td_thrinfo::ti_startfunc, td_thrinfo::ti_state, td_thrinfo::ti_tid, td_thrinfo::ti_type, and warning().

Referenced by info_solthreads().

## ◆ info_solthreads()

static void info_solthreads | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 1125 of file sol-thread.c.

References info_cb(), main_ta, p_td_ta_thr_iter, TD_SIGNO_MASK, TD_THR_ANY_STATE, TD_THR_ANY_USER_FLAGS, and TD_THR_LOWEST_PRIORITY.

Referenced by _initialize_sol_thread().

## ◆ init_sol_thread_ops()

static void init_sol_thread_ops | ( | void |  | ) |
| static

Definition at line 1167 of file sol-thread.c.

References OPS_MAGIC, sol_get_ada_task_ptid(), sol_thread_alive(), sol_thread_detach(), sol_thread_fetch_registers(), sol_thread_mourn_inferior(), sol_thread_ops, sol_thread_resume(), sol_thread_store_registers(), sol_thread_wait(), sol_thread_xfer_partial(), sol_update_thread_list(), solaris_pid_to_str(), thread_stratum, target_ops::to_detach, target_ops::to_doc, target_ops::to_fetch_registers, target_ops::to_get_ada_task_ptid, target_ops::to_longname, target_ops::to_magic, target_ops::to_mourn_inferior, target_ops::to_pid_to_str, target_ops::to_resume, target_ops::to_shortname, target_ops::to_store_registers, target_ops::to_stratum, target_ops::to_thread_alive, target_ops::to_update_thread_list, target_ops::to_wait, and target_ops::to_xfer_partial.

Referenced by _initialize_sol_thread().

## ◆ lwp_to_thread()

static ptid_t lwp_to_thread | ( | ptid_t | lwp | ) |
| static

Definition at line 303 of file sol-thread.c.

References _, error(), selftests::ptid::lwp, main_ta, p_td_ta_map_lwp2thr, p_td_thr_get_info, p_td_thr_validate, pid_to_ptid(), ptid_build(), ptid_get_lwp(), ptid_get_pid(), ptid_tid_p(), target_thread_alive(), td_err_string(), TD_NOTHR, TD_OK, and td_thrinfo::ti_tid.

Referenced by check_for_thread_db(), and sol_thread_wait().

## ◆ ps_lcontinue()

ps_err_e ps_lcontinue | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid
| ) |  |

Definition at line 735 of file sol-thread.c.

References PS_OK.

## ◆ ps_lgetfpregs()

ps_err_e ps_lgetfpregs | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | prfpregset_t * | fpregset
| ) |  |

Definition at line 895 of file sol-thread.c.

References fill_fpregset(), get_thread_arch_regcache(), inferior_ptid, PS_OK, regcache::ptid(), ptid_build(), ptid_get_pid(), target_fetch_registers(), and target_gdbarch().

## ◆ ps_lgetregs()

ps_err_e ps_lgetregs | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | prgregset_t | gregset
| ) |  |

Definition at line 828 of file sol-thread.c.

References fill_gregset(), get_thread_arch_regcache(), inferior_ptid, PS_OK, regcache::ptid(), ptid_build(), ptid_get_pid(), target_fetch_registers(), and target_gdbarch().

## ◆ ps_lgetxregs()

ps_err_e ps_lgetxregs | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | caddr_t | xregset
| ) |  |

Definition at line 879 of file sol-thread.c.

References PS_OK.

## ◆ ps_lgetxregsize()

ps_err_e ps_lgetxregsize | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | int * | xregsize
| ) |  |

Definition at line 871 of file sol-thread.c.

References PS_OK.

## ◆ ps_lsetfpregs()

ps_err_e ps_lsetfpregs | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | const prfpregset_t * | fpregset
| ) |  |

Definition at line 911 of file sol-thread.c.

References get_thread_arch_regcache(), inferior_ptid, PS_OK, regcache::ptid(), ptid_build(), ptid_get_pid(), supply_fpregset(), target_gdbarch(), and target_store_registers().

## ◆ ps_lsetregs()

ps_err_e ps_lsetregs | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | const prgregset_t | gregset
| ) |  |

Definition at line 843 of file sol-thread.c.

References get_thread_arch_regcache(), inferior_ptid, PS_OK, regcache::ptid(), ptid_build(), ptid_get_pid(), supply_gregset(), target_gdbarch(), and target_store_registers().

## ◆ ps_lsetxregs()

ps_err_e ps_lsetxregs | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | caddr_t | xregset
| ) |  |

Definition at line 887 of file sol-thread.c.

References PS_OK.

## ◆ ps_lstop()

ps_err_e ps_lstop | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid
| ) |  |

Definition at line 727 of file sol-thread.c.

References PS_OK.

## ◆ ps_pcontinue()

ps_err_e ps_pcontinue | ( | struct ps_prochandle * | ph | ) |

Definition at line 719 of file sol-thread.c.

References PS_OK.

## ◆ ps_pdread()

ps_err_e ps_pdread | ( | struct ps_prochandle * | ph,
|  | psaddr_t | addr,
|  | void * | buf,
|  | size_t | size
| ) |  |

Definition at line 794 of file sol-thread.c.

References rw_common(), and size.

## ◆ ps_pdwrite()

ps_err_e ps_pdwrite | ( | struct ps_prochandle * | ph,
|  | psaddr_t | addr,
|  | const void * | buf,
|  | size_t | size
| ) |  |

Definition at line 802 of file sol-thread.c.

References rw_common(), and size.

## ◆ ps_pglobal_lookup()

ps_err_e ps_pglobal_lookup | ( | struct ps_prochandle * | ph,
|  | const char * | ld_object_name,
|  | const char * | ld_symbol_name,
|  | psaddr_t * | ld_symbol_addr
| ) |  |

Definition at line 743 of file sol-thread.c.

References BMSYMBOL_VALUE_ADDRESS, lookup_minimal_symbol(), PS_NOSYM, and PS_OK.

## ◆ ps_plog()

void ps_plog | ( | const char * | fmt,
|  |  | ...
| ) |  |

Definition at line 859 of file sol-thread.c.

References gdb_stderr, and vfprintf_filtered().

## ◆ ps_pstop()

ps_err_e ps_pstop | ( | struct ps_prochandle * | ph | ) |

Definition at line 711 of file sol-thread.c.

References PS_OK.

## ◆ ps_ptread()

ps_err_e ps_ptread | ( | struct ps_prochandle * | ph,
|  | psaddr_t | addr,
|  | void * | buf,
|  | size_t | size
| ) |  |

Definition at line 811 of file sol-thread.c.

References rw_common(), and size.

## ◆ ps_ptwrite()

ps_err_e ps_ptwrite | ( | struct ps_prochandle * | ph,
|  | psaddr_t | addr,
|  | const void * | buf,
|  | size_t | size
| ) |  |

Definition at line 819 of file sol-thread.c.

References rw_common(), and size.

## ◆ rw_common()

static ps_err_e rw_common | ( | int | dowrite,
|  | const struct ps_prochandle * | ph,
|  | psaddr_t | addr,
|  | gdb_byte * | buf,
|  | int | size
| ) |  |
| static

Definition at line 759 of file sol-thread.c.

References exec_bfd, inferior_ptid, make_scoped_restore(), procfs_first_available(), PS_ERR, PS_OK, ptid_tid_p(), size, target_read_memory(), target_thread_alive(), and target_write_memory().

Referenced by ps_pdread(), ps_pdwrite(), ps_ptread(), and ps_ptwrite().

## ◆ sol_get_ada_task_ptid()

static ptid_t sol_get_ada_task_ptid | ( | struct target_ops * | self,
|  | long | lwp,
|  | long | thread
| ) |  |
| static

Definition at line 1147 of file sol-thread.c.

References current_target, gdb_assert, iterate_over_threads(), thread_info::ptid, sol_update_thread_list(), and thread_db_find_thread_from_tid().

Referenced by init_sol_thread_ops().

## ◆ sol_thread_alive()

static int sol_thread_alive | ( | struct target_ops * | ops,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 674 of file sol-thread.c.

References target_ops::beneath, find_target_beneath(), main_ta, p_td_ta_map_id2thr, p_td_thr_validate, pid, ptid_get_tid(), ptid_tid_p(), TD_OK, and target_ops::to_thread_alive.

Referenced by init_sol_thread_ops().

## ◆ sol_thread_detach()

static void sol_thread_detach | ( | struct target_ops * | ops,
|  | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 351 of file sol-thread.c.

References target_ops::beneath, find_target_beneath(), inferior_ptid, main_ph, pid_to_ptid(), ps_prochandle::ptid, ptid_get_pid(), sol_thread_active, target_ops::to_detach, and unpush_target().

Referenced by init_sol_thread_ops().

## ◆ sol_thread_fetch_registers()

static void sol_thread_fetch_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 448 of file sol-thread.c.

References _, target_ops::beneath, error(), find_target_beneath(), main_ta, p_td_ta_map_id2thr, p_td_thr_getfpregs, p_td_thr_getgregs, ptid_get_tid(), ptid_tid_p(), regcache_get_ptid(), regnum, supply_fpregset(), supply_gregset(), td_err_string(), TD_NOFPREGS, TD_OK, TD_PARTIALREG, and target_ops::to_fetch_registers.

Referenced by init_sol_thread_ops().

## ◆ sol_thread_mourn_inferior()

static void sol_thread_mourn_inferior | ( | struct target_ops * | ops | ) |
| static

Definition at line 660 of file sol-thread.c.

References target_ops::beneath, find_target_beneath(), sol_thread_active, target_ops::to_mourn_inferior, and unpush_target().

Referenced by init_sol_thread_ops().

## ◆ sol_thread_new_objfile()

static void sol_thread_new_objfile | ( | struct objfile * | objfile | ) |
| static

Definition at line 651 of file sol-thread.c.

References check_for_thread_db().

Referenced by _initialize_sol_thread().

## ◆ sol_thread_resume()

static void sol_thread_resume | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | int | step,
|  | enum gdb_signal | signo
| ) |  |
| static

Definition at line 367 of file sol-thread.c.

References _, target_ops::beneath, error(), find_target_beneath(), inferior_ptid, info_verbose, main_ph, make_scoped_restore(), procfs_first_available(), ps_prochandle::ptid, ptid_get_pid(), ptid_get_tid(), thread_to_lwp(), target_ops::to_resume, and warning().

Referenced by init_sol_thread_ops().

## ◆ sol_thread_store_registers()

static void sol_thread_store_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 504 of file sol-thread.c.

References _, target_ops::beneath, error(), fill_fpregset(), fill_gregset(), find_target_beneath(), main_ta, p_td_ta_map_id2thr, p_td_thr_getfpregs, p_td_thr_getgregs, p_td_thr_setfpregs, p_td_thr_setgregs, ptid_get_tid(), ptid_tid_p(), regcache_get_ptid(), regnum, td_err_string(), TD_OK, and target_ops::to_store_registers.

Referenced by init_sol_thread_ops().

## ◆ sol_thread_wait()

static ptid_t sol_thread_wait | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | struct target_waitstatus * | ourstatus,
|  | int | options
| ) |  |
| static

Definition at line 397 of file sol-thread.c.

References _, add_thread(), target_ops::beneath, error(), find_target_beneath(), in_thread_list(), inferior_ptid, info_verbose, is_exited(), target_waitstatus::kind, lwp_to_thread(), main_ph, make_scoped_restore(), procfs_first_available(), ps_prochandle::ptid, ptid_equal(), ptid_get_pid(), ptid_get_tid(), ptid_tid_p(), TARGET_WAITKIND_EXITED, thread_to_lwp(), target_ops::to_wait, and warning().

Referenced by init_sol_thread_ops().

## ◆ sol_thread_xfer_partial()

static enum target_xfer_status sol_thread_xfer_partial | ( | struct target_ops * | ops,
|  | enum target_object | object,
|  | const char * | annex,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | offset,
|  | ULONGEST | len,
|  | ULONGEST * | xfered_len
| ) |  |
| static

Definition at line 561 of file sol-thread.c.

References target_ops::beneath, find_target_beneath(), inferior_ptid, make_scoped_restore(), offset, procfs_first_available(), ptid_tid_p(), target_thread_alive(), and target_ops::to_xfer_partial.

Referenced by init_sol_thread_ops().

## ◆ sol_update_thread_list()

static void sol_update_thread_list | ( | struct target_ops * | ops | ) |
| static

Definition at line 1031 of file sol-thread.c.

References target_ops::beneath, find_target_beneath(), main_ta, p_td_ta_thr_iter, prune_threads(), sol_update_thread_list_callback(), TD_SIGNO_MASK, TD_THR_ANY_STATE, TD_THR_ANY_USER_FLAGS, TD_THR_LOWEST_PRIORITY, and target_ops::to_update_thread_list.

Referenced by init_sol_thread_ops(), and sol_get_ada_task_ptid().

## ◆ sol_update_thread_list_callback()

static int sol_update_thread_list_callback | ( | const td_thrhandle_t * | th,
|  | void * | ignored
| ) |  |
| static

Definition at line 1013 of file sol-thread.c.

References add_thread(), in_thread_list(), inferior_ptid, is_exited(), p_td_thr_get_info, ptid_build(), ptid_get_pid(), TD_OK, and td_thrinfo::ti_tid.

Referenced by sol_update_thread_list().

## ◆ solaris_pid_to_str()

static const char* solaris_pid_to_str | ( | struct target_ops * | ops,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 980 of file sol-thread.c.

References selftests::ptid::lwp, ptid_get_lwp(), ptid_get_pid(), ptid_get_tid(), ptid_tid_p(), thread_to_lwp(), and xsnprintf().

Referenced by init_sol_thread_ops().

## ◆ td_err_string()

static const char* td_err_string | ( | td_err_e | errcode | ) |
| static

Definition at line 183 of file sol-thread.c.

References string_map::num, string_map::str, TD_BADKEY, TD_BADPH, TD_BADSH, TD_BADTA, TD_BADTH, TD_DBERR, TD_ERR, TD_MALLOC, TD_NOAPLIC, TD_NOCAPAB, TD_NOEVENT, TD_NOFPREGS, TD_NOLIBTHREAD, TD_NOLWP, TD_NOMSG, TD_NOSV, TD_NOTHR, TD_NOTSD, TD_NOXREGS, TD_OK, TD_PARTIALREG, and xsnprintf().

Referenced by check_for_thread_db(), lwp_to_thread(), sol_thread_fetch_registers(), sol_thread_store_registers(), and thread_to_lwp().

## ◆ td_state_string()

static const char* td_state_string | ( | td_thr_state_e | statecode | ) |
| static

Definition at line 227 of file sol-thread.c.

References string_map::num, string_map::str, TD_THR_ACTIVE, TD_THR_ANY_STATE, TD_THR_RUN, TD_THR_SLEEP, TD_THR_STOPPED, TD_THR_STOPPED_ASLEEP, TD_THR_UNKNOWN, TD_THR_ZOMBIE, and xsnprintf().

Referenced by thread_to_lwp().

## ◆ thread_db_find_thread_from_tid()

static int thread_db_find_thread_from_tid | ( | struct thread_info * | thread,
|  | void * | data
| ) |  |
| static

Definition at line 1136 of file sol-thread.c.

References thread_info::ptid, ptid_get_tid(), and selftests::ptid::tid.

Referenced by sol_get_ada_task_ptid().

## ◆ thread_to_lwp()

static ptid_t thread_to_lwp | ( | ptid_t | thread_id,
|  | int | default_lwp
| ) |  |
| static

Definition at line 263 of file sol-thread.c.

References _, error(), main_ta, p_td_ta_map_id2thr, p_td_thr_get_info, pid_to_ptid(), ptid_build(), ptid_get_pid(), ptid_get_tid(), ptid_lwp_p(), td_err_string(), TD_NOTHR, TD_OK, td_state_string(), TD_THR_ACTIVE, td_thrinfo::ti_lid, and td_thrinfo::ti_state.

Referenced by sol_thread_resume(), sol_thread_wait(), and solaris_pid_to_str().

## Variable Documentation

## ◆ main_ph

struct ps_prochandle main_ph
| static

Definition at line 92 of file sol-thread.c.

Referenced by check_for_thread_db(), sol_thread_detach(), sol_thread_resume(), and sol_thread_wait().

## ◆ main_ta

td_thragent_t* main_ta
| static

Definition at line 93 of file sol-thread.c.

Referenced by check_for_thread_db(), info_solthreads(), lwp_to_thread(), sol_thread_alive(), sol_thread_fetch_registers(), sol_thread_store_registers(), sol_update_thread_list(), and thread_to_lwp().

## ◆ p_td_init

td_init_ftype* p_td_init
| static

Definition at line 157 of file sol-thread.c.

Referenced by check_for_thread_db().

## ◆ p_td_log

td_log_ftype* p_td_log
| static

Definition at line 154 of file sol-thread.c.

## ◆ p_td_ta_delete

td_ta_delete_ftype* p_td_ta_delete
| static

Definition at line 156 of file sol-thread.c.

## ◆ p_td_ta_get_nthreads

td_ta_get_nthreads_ftype* p_td_ta_get_nthreads
| static

Definition at line 159 of file sol-thread.c.

## ◆ p_td_ta_get_ph

td_ta_get_ph_ftype* p_td_ta_get_ph
| static

Definition at line 158 of file sol-thread.c.

## ◆ p_td_ta_map_id2thr

td_ta_map_id2thr_ftype* p_td_ta_map_id2thr
| static

Definition at line 173 of file sol-thread.c.

Referenced by sol_thread_alive(), sol_thread_fetch_registers(), sol_thread_store_registers(), and thread_to_lwp().

## ◆ p_td_ta_map_lwp2thr

td_ta_map_lwp2thr_ftype* p_td_ta_map_lwp2thr
| static

Definition at line 174 of file sol-thread.c.

Referenced by lwp_to_thread().

## ◆ p_td_ta_new

td_ta_new_ftype* p_td_ta_new
| static

Definition at line 155 of file sol-thread.c.

Referenced by check_for_thread_db().

## ◆ p_td_ta_thr_iter

td_ta_thr_iter_ftype* p_td_ta_thr_iter
| static

Definition at line 161 of file sol-thread.c.

Referenced by info_solthreads(), and sol_update_thread_list().

## ◆ p_td_ta_tsd_iter

td_ta_tsd_iter_ftype* p_td_ta_tsd_iter
| static

Definition at line 160 of file sol-thread.c.

## ◆ p_td_thr_get_info

td_thr_get_info_ftype* p_td_thr_get_info
| static

Definition at line 164 of file sol-thread.c.

Referenced by info_cb(), lwp_to_thread(), sol_update_thread_list_callback(), and thread_to_lwp().

## ◆ p_td_thr_getfpregs

td_thr_getfpregs_ftype* p_td_thr_getfpregs
| static

Definition at line 165 of file sol-thread.c.

Referenced by sol_thread_fetch_registers(), and sol_thread_store_registers().

## ◆ p_td_thr_getgregs

td_thr_getgregs_ftype* p_td_thr_getgregs
| static

Definition at line 175 of file sol-thread.c.

Referenced by sol_thread_fetch_registers(), and sol_thread_store_registers().

## ◆ p_td_thr_getxregs

td_thr_getxregs_ftype* p_td_thr_getxregs
| static

Definition at line 167 of file sol-thread.c.

## ◆ p_td_thr_getxregsize

td_thr_getxregsize_ftype* p_td_thr_getxregsize
| static

Definition at line 166 of file sol-thread.c.

## ◆ p_td_thr_setfpregs

td_thr_setfpregs_ftype* p_td_thr_setfpregs
| static

Definition at line 171 of file sol-thread.c.

Referenced by sol_thread_store_registers().

## ◆ p_td_thr_setgregs

td_thr_setgregs_ftype* p_td_thr_setgregs
| static

Definition at line 176 of file sol-thread.c.

Referenced by sol_thread_store_registers().

## ◆ p_td_thr_setprio

td_thr_setprio_ftype* p_td_thr_setprio
| static

Definition at line 169 of file sol-thread.c.

## ◆ p_td_thr_setsigpending

td_thr_setsigpending_ftype* p_td_thr_setsigpending
| static

Definition at line 170 of file sol-thread.c.

## ◆ p_td_thr_setxregs

td_thr_setxregs_ftype* p_td_thr_setxregs
| static

Definition at line 172 of file sol-thread.c.

## ◆ p_td_thr_sigsetmask

td_thr_sigsetmask_ftype* p_td_thr_sigsetmask
| static

Definition at line 168 of file sol-thread.c.

## ◆ p_td_thr_tsd

td_thr_tsd_ftype* p_td_thr_tsd
| static

Definition at line 163 of file sol-thread.c.

## ◆ p_td_thr_validate

td_thr_validate_ftype* p_td_thr_validate
| static

Definition at line 162 of file sol-thread.c.

Referenced by lwp_to_thread(), and sol_thread_alive().

## ◆ sol_thread_active

int sol_thread_active = 0
| static

Definition at line 94 of file sol-thread.c.

Referenced by check_for_thread_db(), sol_thread_detach(), and sol_thread_mourn_inferior().

## ◆ sol_thread_ops

struct target_ops sol_thread_ops

Definition at line 72 of file sol-thread.c.

Referenced by _initialize_sol_thread(), check_for_thread_db(), and init_sol_thread_ops().