GDB (xrefs)
|
#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 struct ps_prochandle * | gdb_ps_prochandle_t |
typedef void * | gdb_ps_read_buf_t |
typedef const void * | gdb_ps_write_buf_t |
typedef size_t | gdb_ps_size_t |
typedef psaddr_t | gdb_ps_addr_t |
#define resolve | ( | X | ) |
Referenced by _initialize_sol_thread().
typedef psaddr_t gdb_ps_addr_t |
Definition at line 721 of file sol-thread.c.
typedef struct ps_prochandle* gdb_ps_prochandle_t |
Definition at line 717 of file sol-thread.c.
typedef void* gdb_ps_read_buf_t |
Definition at line 718 of file sol-thread.c.
typedef size_t gdb_ps_size_t |
Definition at line 720 of file sol-thread.c.
typedef const void* gdb_ps_write_buf_t |
Definition at line 719 of file sol-thread.c.
void _initialize_sol_thread | ( | void | ) |
Definition at line 1241 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().
|
static |
Definition at line 578 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().
|
static |
Definition at line 1103 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().
|
static |
Definition at line 1175 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().
|
static |
Definition at line 1217 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().
Definition at line 277 of file sol-thread.c.
References _, error(), 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_err_e ps_lcontinue | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid | ||
) |
Definition at line 756 of file sol-thread.c.
References PS_OK.
ps_err_e ps_lgetfpregs | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
prfpregset_t * | fpregset | ||
) |
Definition at line 933 of file sol-thread.c.
References do_cleanups(), fill_fpregset(), get_thread_arch_regcache(), inferior_ptid, PS_OK, ptid_build(), ptid_get_pid(), save_inferior_ptid(), target_fetch_registers(), and target_gdbarch().
ps_err_e ps_lgetregs | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
prgregset_t | gregset | ||
) |
Definition at line 854 of file sol-thread.c.
References do_cleanups(), fill_gregset(), get_thread_arch_regcache(), inferior_ptid, PS_OK, ptid_build(), ptid_get_pid(), save_inferior_ptid(), target_fetch_registers(), and target_gdbarch().
ps_err_e ps_lgetxregs | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
caddr_t | xregset | ||
) |
Definition at line 917 of file sol-thread.c.
References PS_OK.
ps_err_e ps_lgetxregsize | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
int * | xregsize | ||
) |
Definition at line 909 of file sol-thread.c.
References PS_OK.
ps_err_e ps_lsetfpregs | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
const prfpregset_t * | fpregset | ||
) |
Definition at line 955 of file sol-thread.c.
References do_cleanups(), get_thread_arch_regcache(), inferior_ptid, PS_OK, ptid_build(), ptid_get_pid(), save_inferior_ptid(), supply_fpregset(), target_gdbarch(), and target_store_registers().
ps_err_e ps_lsetregs | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
const prgregset_t | gregset | ||
) |
Definition at line 875 of file sol-thread.c.
References do_cleanups(), get_thread_arch_regcache(), inferior_ptid, PS_OK, ptid_build(), ptid_get_pid(), save_inferior_ptid(), supply_gregset(), target_gdbarch(), and target_store_registers().
ps_err_e ps_lsetxregs | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid, | ||
caddr_t | xregset | ||
) |
Definition at line 925 of file sol-thread.c.
References PS_OK.
ps_err_e ps_lstop | ( | gdb_ps_prochandle_t | ph, |
lwpid_t | lwpid | ||
) |
Definition at line 748 of file sol-thread.c.
References PS_OK.
ps_err_e ps_pcontinue | ( | gdb_ps_prochandle_t | ph | ) |
Definition at line 740 of file sol-thread.c.
References PS_OK.
ps_err_e ps_pdread | ( | gdb_ps_prochandle_t | ph, |
gdb_ps_addr_t | addr, | ||
gdb_ps_read_buf_t | buf, | ||
gdb_ps_size_t | size | ||
) |
Definition at line 818 of file sol-thread.c.
References rw_common().
ps_err_e ps_pdwrite | ( | gdb_ps_prochandle_t | ph, |
gdb_ps_addr_t | addr, | ||
gdb_ps_write_buf_t | buf, | ||
gdb_ps_size_t | size | ||
) |
Definition at line 827 of file sol-thread.c.
References rw_common().
ps_err_e ps_pglobal_lookup | ( | gdb_ps_prochandle_t | ph, |
const char * | ld_object_name, | ||
const char * | ld_symbol_name, | ||
gdb_ps_addr_t * | ld_symbol_addr | ||
) |
Definition at line 764 of file sol-thread.c.
References BMSYMBOL_VALUE_ADDRESS, lookup_minimal_symbol(), PS_NOSYM, and PS_OK.
void ps_plog | ( | const char * | fmt, |
... | |||
) |
Definition at line 897 of file sol-thread.c.
References gdb_stderr, and vfprintf_filtered().
ps_err_e ps_pstop | ( | gdb_ps_prochandle_t | ph | ) |
Definition at line 732 of file sol-thread.c.
References PS_OK.
ps_err_e ps_ptread | ( | gdb_ps_prochandle_t | ph, |
gdb_ps_addr_t | addr, | ||
gdb_ps_read_buf_t | buf, | ||
gdb_ps_size_t | size | ||
) |
Definition at line 836 of file sol-thread.c.
References rw_common().
ps_err_e ps_ptwrite | ( | gdb_ps_prochandle_t | ph, |
gdb_ps_addr_t | addr, | ||
gdb_ps_write_buf_t | buf, | ||
gdb_ps_size_t | size | ||
) |
Definition at line 845 of file sol-thread.c.
References rw_common().
|
static |
Definition at line 780 of file sol-thread.c.
References do_cleanups(), exec_bfd, inferior_ptid, procfs_first_available(), PS_ERR, PS_OK, ptid_tid_p(), save_inferior_ptid(), target_read_memory(), target_thread_alive(), and target_write_memory().
Referenced by ps_pdread(), ps_pdwrite(), ps_ptread(), and ps_ptwrite().
|
static |
Definition at line 1197 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().
|
static |
Definition at line 667 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().
|
static |
Definition at line 325 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().
|
static |
Definition at line 428 of file sol-thread.c.
References _, target_ops::beneath, error(), find_target_beneath(), inferior_ptid, main_ta, p_td_ta_map_id2thr, p_td_thr_getfpregs, p_td_thr_getgregs, ptid_get_tid(), ptid_tid_p(), 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().
|
static |
Definition at line 653 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().
|
static |
Definition at line 644 of file sol-thread.c.
References check_for_thread_db().
Referenced by _initialize_sol_thread().
|
static |
Definition at line 341 of file sol-thread.c.
References _, target_ops::beneath, do_cleanups(), error(), find_target_beneath(), inferior_ptid, info_verbose, main_ph, procfs_first_available(), ps_prochandle::ptid, ptid_get_pid(), ptid_get_tid(), save_inferior_ptid(), thread_to_lwp(), target_ops::to_resume, and warning().
Referenced by init_sol_thread_ops().
|
static |
Definition at line 483 of file sol-thread.c.
References _, target_ops::beneath, error(), fill_fpregset(), fill_gregset(), find_target_beneath(), inferior_ptid, main_ta, MAX_REGISTER_SIZE, 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_raw_collect(), regcache_raw_supply(), td_err_string(), TD_OK, and target_ops::to_store_registers.
Referenced by init_sol_thread_ops().
|
static |
Definition at line 374 of file sol-thread.c.
References _, add_thread(), target_ops::beneath, do_cleanups(), error(), find_target_beneath(), in_thread_list(), inferior_ptid, info_verbose, is_exited(), target_waitstatus::kind, lwp_to_thread(), main_ph, procfs_first_available(), ps_prochandle::ptid, ptid_equal(), ptid_get_pid(), ptid_get_tid(), ptid_tid_p(), save_inferior_ptid(), TARGET_WAITKIND_EXITED, thread_to_lwp(), target_ops::to_wait, and warning().
Referenced by init_sol_thread_ops().
|
static |
Definition at line 548 of file sol-thread.c.
References target_ops::beneath, do_cleanups(), find_target_beneath(), inferior_ptid, procfs_first_available(), ptid_tid_p(), save_inferior_ptid(), target_thread_alive(), and target_ops::to_xfer_partial.
Referenced by init_sol_thread_ops().
|
static |
Definition at line 1081 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().
|
static |
Definition at line 1063 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().
|
static |
Definition at line 1030 of file sol-thread.c.
References ptid_get_lwp(), ptid_get_pid(), ptid_get_tid(), ptid_tid_p(), thread_to_lwp(), and xsnprintf().
Referenced by init_sol_thread_ops().
|
static |
Definition at line 157 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().
|
static |
Definition at line 201 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().
|
static |
Definition at line 1186 of file sol-thread.c.
References thread_info::ptid, and ptid_get_tid().
Referenced by sol_get_ada_task_ptid().
Definition at line 237 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().
|
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().
|
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().
|
static |
Definition at line 107 of file sol-thread.c.
Referenced by check_for_thread_db().
Definition at line 103 of file sol-thread.c.
|
static |
Definition at line 106 of file sol-thread.c.
|
static |
Definition at line 110 of file sol-thread.c.
|
static |
Definition at line 108 of file sol-thread.c.
|
static |
Definition at line 141 of file sol-thread.c.
Referenced by sol_thread_alive(), sol_thread_fetch_registers(), sol_thread_store_registers(), and thread_to_lwp().
|
static |
Definition at line 144 of file sol-thread.c.
Referenced by lwp_to_thread().
|
static |
Definition at line 104 of file sol-thread.c.
Referenced by check_for_thread_db().
|
static |
Definition at line 114 of file sol-thread.c.
Referenced by info_solthreads(), and sol_update_thread_list().
|
static |
Definition at line 112 of file sol-thread.c.
|
static |
Definition at line 122 of file sol-thread.c.
Referenced by info_cb(), lwp_to_thread(), sol_update_thread_list_callback(), and thread_to_lwp().
|
static |
Definition at line 124 of file sol-thread.c.
Referenced by sol_thread_fetch_registers(), and sol_thread_store_registers().
|
static |
Definition at line 147 of file sol-thread.c.
Referenced by sol_thread_fetch_registers(), and sol_thread_store_registers().
|
static |
Definition at line 128 of file sol-thread.c.
|
static |
Definition at line 126 of file sol-thread.c.
|
static |
Definition at line 137 of file sol-thread.c.
Referenced by sol_thread_store_registers().
|
static |
Definition at line 149 of file sol-thread.c.
Referenced by sol_thread_store_registers().
|
static |
Definition at line 132 of file sol-thread.c.
|
static |
Definition at line 134 of file sol-thread.c.
|
static |
Definition at line 139 of file sol-thread.c.
|
static |
Definition at line 130 of file sol-thread.c.
|
static |
Definition at line 120 of file sol-thread.c.
|
static |
Definition at line 119 of file sol-thread.c.
Referenced by lwp_to_thread(), and sol_thread_alive().
|
static |
Definition at line 94 of file sol-thread.c.
Referenced by check_for_thread_db(), sol_thread_detach(), and sol_thread_mourn_inferior().
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().