GDB (xrefs)
|
#include "defs.h"
#include "gdb_assert.h"
#include "gdbthread.h"
#include "target.h"
#include "inferior.h"
#include "regcache.h"
#include "gdbcmd.h"
#include "ppc-tdep.h"
#include "gdb_string.h"
#include "observer.h"
#include <procinfo.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/reg.h>
#include <sched.h>
#include <sys/pthdebug.h>
Go to the source code of this file.
Classes | |
struct | private_thread_info |
struct | pd_thread |
Defines | |
#define | pthdb_tid_t tid_t |
#define | PD_TID(ptid) (pd_active && ptid_get_tid (ptid) != 0) |
#define | PD_USER 1 |
#define | PDC_SUCCESS PTHDB_SUCCESS |
#define | PDC_FAILURE PTHDB_CALLBACK |
#define | addr_ptr int * |
Functions | |
int | getthrds (pid_t, struct thrdsinfo64 *, int, tid_t *, int) |
static int | pdc_symbol_addrs (pthdb_user_t, pthdb_symbol_t *, int) |
static int | pdc_read_data (pthdb_user_t, void *, pthdb_addr_t, size_t) |
static int | pdc_write_data (pthdb_user_t, void *, pthdb_addr_t, size_t) |
static int | pdc_read_regs (pthdb_user_t user, pthdb_tid_t tid, unsigned long long flags, pthdb_context_t *context) |
static int | pdc_write_regs (pthdb_user_t user, pthdb_tid_t tid, unsigned long long flags, pthdb_context_t *context) |
static int | pdc_alloc (pthdb_user_t, size_t, void **) |
static int | pdc_realloc (pthdb_user_t, void *, size_t, void **) |
static int | pdc_dealloc (pthdb_user_t, void *) |
static char * | pd_status2str (int status) |
static int | ptrace_check (int req, int id, int ret) |
static int | ptrace64aix (int req, int id, long long addr, int data, int *buf) |
static int | ptrace32 (int req, int id, addr_ptr addr, int data, int *buf) |
static void | pid_to_prc (ptid_t *ptidp) |
static char * | state2str (pthdb_state_t state) |
static int | pcmp (const void *p1v, const void *p2v) |
static int | giter_count (struct thread_info *thread, void *countp) |
static int | giter_accum (struct thread_info *thread, void *bufp) |
static int | ptid_cmp (ptid_t ptid1, ptid_t ptid2) |
static int | gcmp (const void *t1v, const void *t2v) |
static pthdb_tid_t | get_signaled_thread (void) |
static void | sync_threadlists (void) |
static int | iter_tid (struct thread_info *thread, void *tidp) |
static ptid_t | pd_update (int set_infpid) |
static ptid_t | pd_activate (int set_infpid) |
static void | pd_deactivate (void) |
static void | pd_enable (void) |
static void | pd_disable (void) |
static void | new_objfile (struct objfile *objfile) |
static void | aix_thread_attach (struct target_ops *ops, char *args, int from_tty) |
static void | aix_thread_detach (struct target_ops *ops, char *args, int from_tty) |
static void | aix_thread_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal sig) |
static ptid_t | aix_thread_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options) |
static void | supply_gprs64 (struct regcache *regcache, uint64_t *vals) |
static void | supply_reg32 (struct regcache *regcache, int regno, uint32_t val) |
static void | supply_fprs (struct regcache *regcache, double *vals) |
static int | special_register_p (struct gdbarch *gdbarch, int regno) |
static void | supply_sprs64 (struct regcache *regcache, uint64_t iar, uint64_t msr, uint32_t cr, uint64_t lr, uint64_t ctr, uint32_t xer, uint32_t fpscr) |
static void | supply_sprs32 (struct regcache *regcache, uint32_t iar, uint32_t msr, uint32_t cr, uint32_t lr, uint32_t ctr, uint32_t xer, uint32_t fpscr) |
static void | fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid) |
static void | fetch_regs_kernel_thread (struct regcache *regcache, int regno, pthdb_tid_t tid) |
static void | aix_thread_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
static void | fill_gprs64 (const struct regcache *regcache, uint64_t *vals) |
static void | fill_gprs32 (const struct regcache *regcache, uint32_t *vals) |
static void | fill_fprs (const struct regcache *regcache, double *vals) |
static void | fill_sprs64 (const struct regcache *regcache, uint64_t *iar, uint64_t *msr, uint32_t *cr, uint64_t *lr, uint64_t *ctr, uint32_t *xer, uint32_t *fpscr) |
static void | fill_sprs32 (const struct regcache *regcache, uint32_t *iar, uint32_t *msr, uint32_t *cr, uint32_t *lr, uint32_t *ctr, uint32_t *xer, uint32_t *fpscr) |
static void | store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid) |
static void | store_regs_kernel_thread (const struct regcache *regcache, int regno, pthdb_tid_t tid) |
static void | aix_thread_store_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
static LONGEST | aix_thread_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len) |
static void | aix_thread_mourn_inferior (struct target_ops *ops) |
static int | aix_thread_thread_alive (struct target_ops *ops, ptid_t ptid) |
static char * | aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid) |
static char * | aix_thread_extra_thread_info (struct thread_info *thread) |
static ptid_t | aix_thread_get_ada_task_ptid (long lwp, long thread) |
static void | init_aix_thread_ops (void) |
void | _initialize_aix_thread (void) |
Variables | |
static int | debug_aix_thread |
static struct target_ops | aix_thread_ops |
static CORE_ADDR | pd_brk_addr |
static int | pd_able = 0 |
static int | pd_active = 0 |
static int | arch64 |
static pthdb_callbacks_t | pd_callbacks |
static pthdb_session_t | pd_session |
Definition at line 259 of file aix-thread.c.
Referenced by aix_thread_resume(), fetch_regs_kernel_thread(), pdc_read_regs(), pdc_write_regs(), and store_regs_kernel_thread().
#define PD_TID | ( | ptid | ) | (pd_active && ptid_get_tid (ptid) != 0) |
Definition at line 74 of file aix-thread.c.
Referenced by aix_thread_extra_thread_info(), aix_thread_fetch_registers(), aix_thread_pid_to_str(), aix_thread_resume(), aix_thread_store_registers(), aix_thread_thread_alive(), giter_accum(), giter_count(), and pid_to_prc().
#define PD_USER 1 |
Definition at line 79 of file aix-thread.c.
Referenced by pd_activate(), and pd_enable().
#define PDC_FAILURE PTHDB_CALLBACK |
Definition at line 84 of file aix-thread.c.
Referenced by pdc_alloc(), pdc_read_data(), pdc_realloc(), pdc_symbol_addrs(), and pdc_write_data().
#define PDC_SUCCESS PTHDB_SUCCESS |
Definition at line 83 of file aix-thread.c.
Referenced by pdc_alloc(), pdc_dealloc(), pdc_read_data(), pdc_realloc(), pdc_symbol_addrs(), and pdc_write_data().
#define pthdb_tid_t tid_t |
Definition at line 69 of file aix-thread.c.
Referenced by aix_thread_extra_thread_info(), aix_thread_fetch_registers(), aix_thread_resume(), aix_thread_store_registers(), iter_tid(), pd_update(), and sync_threadlists().
void _initialize_aix_thread | ( | void | ) |
Definition at line 1848 of file aix-thread.c.
References _, add_setshow_boolean_cmd(), aix_thread_ops, class_maintenance, complete_target_initialization(), debug_aix_thread, init_aix_thread_ops(), new_objfile(), observer_attach_new_objfile(), setdebuglist, and showdebuglist.
static void aix_thread_attach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 959 of file aix-thread.c.
References target_ops::beneath, find_target_beneath(), pd_activate(), and target_ops::to_attach.
Referenced by init_aix_thread_ops().
static void aix_thread_detach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 970 of file aix-thread.c.
References target_ops::beneath, find_target_beneath(), pd_disable(), and target_ops::to_detach.
Referenced by init_aix_thread_ops().
static char* aix_thread_extra_thread_info | ( | struct thread_info * | thread | ) | [static] |
Definition at line 1753 of file aix-thread.c.
References _, fprintf_unfiltered(), mem_fileopen(), pd_session, PD_TID, private_thread_info::pdtid, thread_info::private, pthdb_tid_t, thread_info::ptid, state2str(), exsummary::status, private_thread_info::tid, ui_file_delete(), ui_file_write(), ui_file_xstrdup(), and xfree().
Referenced by init_aix_thread_ops().
static void aix_thread_fetch_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 1306 of file aix-thread.c.
References target_ops::beneath, fetch_regs_kernel_thread(), fetch_regs_user_thread(), find_target_beneath(), find_thread_ptid(), inferior_ptid, PD_TID, private_thread_info::pdtid, thread_info::private, pthdb_tid_t, private_thread_info::tid, and target_ops::to_fetch_registers.
Referenced by init_aix_thread_ops().
static ptid_t aix_thread_get_ada_task_ptid | ( | long | lwp, |
long | thread | ||
) | [static] |
Definition at line 1810 of file aix-thread.c.
References inferior_ptid, ptid_build(), and ptid_get_pid().
Referenced by init_aix_thread_ops().
static void aix_thread_mourn_inferior | ( | struct target_ops * | ops | ) | [static] |
Definition at line 1706 of file aix-thread.c.
References target_ops::beneath, find_target_beneath(), pd_deactivate(), and target_ops::to_mourn_inferior.
Referenced by init_aix_thread_ops().
static char* aix_thread_pid_to_str | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 1733 of file aix-thread.c.
References _, target_ops::beneath, find_target_beneath(), PD_TID, ptid_get_tid(), target_ops::to_pid_to_str, xfree(), and xstrprintf().
Referenced by init_aix_thread_ops().
static void aix_thread_resume | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
int | step, | ||
enum gdb_signal | sig | ||
) | [static] |
Definition at line 982 of file aix-thread.c.
References _, addr_ptr, arch64, target_ops::beneath, do_cleanups(), error(), find_target_beneath(), find_thread_ptid(), gdb_signal_to_host(), inferior_ptid, PD_TID, pid_to_ptid(), thread_info::private, pthdb_tid_t, ptid_get_lwp(), ptid_get_pid(), ptrace32(), ptrace64aix(), save_inferior_ptid(), private_thread_info::tid, and target_ops::to_resume.
Referenced by init_aix_thread_ops().
static void aix_thread_store_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 1660 of file aix-thread.c.
References target_ops::beneath, find_target_beneath(), find_thread_ptid(), inferior_ptid, PD_TID, private_thread_info::pdtid, thread_info::private, pthdb_tid_t, store_regs_kernel_thread(), store_regs_user_thread(), private_thread_info::tid, and target_ops::to_store_registers.
Referenced by init_aix_thread_ops().
static int aix_thread_thread_alive | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 1717 of file aix-thread.c.
References target_ops::beneath, find_target_beneath(), in_thread_list(), PD_TID, and target_ops::to_thread_alive.
Referenced by init_aix_thread_ops().
static ptid_t aix_thread_wait | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
struct target_waitstatus * | status, | ||
int | options | ||
) | [static] |
Definition at line 1024 of file aix-thread.c.
References target_ops::beneath, do_cleanups(), find_target_beneath(), gdbarch_decr_pc_after_break(), get_regcache_arch(), get_thread_regcache(), inferior_ptid, target_waitstatus::kind, pd_activate(), pd_active, pd_brk_addr, pd_update(), pid_to_prc(), pid_to_ptid(), ptid_get_pid(), regcache_read_pc(), save_inferior_ptid(), target_waitstatus::sig, TARGET_WAITKIND_STOPPED, target_ops::to_wait, and target_waitstatus::value.
Referenced by init_aix_thread_ops().
static LONGEST aix_thread_xfer_partial | ( | struct target_ops * | ops, |
enum target_object | object, | ||
const char * | annex, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 1686 of file aix-thread.c.
References target_ops::beneath, do_cleanups(), find_target_beneath(), inferior_ptid, LONGEST, pid_to_ptid(), ptid_get_pid(), save_inferior_ptid(), and target_ops::to_xfer_partial.
Referenced by init_aix_thread_ops().
static void fetch_regs_kernel_thread | ( | struct regcache * | regcache, |
int | regno, | ||
pthdb_tid_t | tid | ||
) | [static] |
Definition at line 1222 of file aix-thread.c.
References addr_ptr, arch64, debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, gdbarch_tdep(), get_regcache_arch(), memset(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_mq_regnum, ppc_num_fprs, ppc_num_gprs, ptrace32(), ptrace64aix(), regcache_raw_supply(), special_register_p(), supply_fprs(), supply_gprs64(), supply_reg32(), supply_sprs32(), and supply_sprs64().
Referenced by aix_thread_fetch_registers().
static void fetch_regs_user_thread | ( | struct regcache * | regcache, |
pthdb_pthread_t | pdtid | ||
) | [static] |
Definition at line 1168 of file aix-thread.c.
References _, arch64, debug_aix_thread, error(), fprintf_unfiltered(), gdb_stdlog, gdbarch_tdep(), get_regcache_arch(), pd_session, pd_status2str(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, exsummary::status, supply_fprs(), supply_gprs64(), supply_reg32(), supply_sprs32(), and supply_sprs64().
Referenced by aix_thread_fetch_registers().
Definition at line 1357 of file aix-thread.c.
References gdb_assert, gdbarch_tdep(), get_regcache_arch(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_fp0_regnum, ppc_num_fprs, REG_VALID, regcache_raw_collect(), and regcache_register_status().
Referenced by store_regs_kernel_thread(), and store_regs_user_thread().
static void fill_gprs32 | ( | const struct regcache * | regcache, |
uint32_t * | vals | ||
) | [static] |
Definition at line 1343 of file aix-thread.c.
References gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, REG_VALID, regcache_raw_collect(), and regcache_register_status().
Referenced by store_regs_kernel_thread().
static void fill_gprs64 | ( | const struct regcache * | regcache, |
uint64_t * | vals | ||
) | [static] |
Definition at line 1330 of file aix-thread.c.
References gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, REG_VALID, regcache_raw_collect(), and regcache_register_status().
Referenced by store_regs_kernel_thread().
static void fill_sprs32 | ( | const struct regcache * | regcache, |
uint32_t * | iar, | ||
uint32_t * | msr, | ||
uint32_t * | cr, | ||
uint32_t * | lr, | ||
uint32_t * | ctr, | ||
uint32_t * | xer, | ||
uint32_t * | fpscr | ||
) | [static] |
Definition at line 1415 of file aix-thread.c.
References gdb_assert, gdbarch_pc_regnum(), gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_ps_regnum, gdbarch_tdep::ppc_xer_regnum, REG_VALID, regcache_raw_collect(), regcache_register_status(), and register_size().
Referenced by store_regs_kernel_thread(), and store_regs_user_thread().
static void fill_sprs64 | ( | const struct regcache * | regcache, |
uint64_t * | iar, | ||
uint64_t * | msr, | ||
uint32_t * | cr, | ||
uint64_t * | lr, | ||
uint64_t * | ctr, | ||
uint32_t * | xer, | ||
uint32_t * | fpscr | ||
) | [static] |
Definition at line 1379 of file aix-thread.c.
References gdb_assert, gdbarch_pc_regnum(), gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_ps_regnum, gdbarch_tdep::ppc_xer_regnum, REG_VALID, regcache_raw_collect(), regcache_register_status(), and register_size().
Referenced by store_regs_kernel_thread(), and store_regs_user_thread().
Definition at line 646 of file aix-thread.c.
References thread_info::ptid, and ptid_cmp().
Referenced by sync_threadlists().
static pthdb_tid_t get_signaled_thread | ( | void | ) | [static] |
Definition at line 658 of file aix-thread.c.
References getthrds(), inferior_ptid, and ptid_get_pid().
Referenced by pd_update().
Referenced by get_signaled_thread().
static int giter_accum | ( | struct thread_info * | thread, |
void * | bufp | ||
) | [static] |
Definition at line 610 of file aix-thread.c.
References PD_TID, and thread_info::ptid.
Referenced by sync_threadlists().
static int giter_count | ( | struct thread_info * | thread, |
void * | countp | ||
) | [static] |
Definition at line 595 of file aix-thread.c.
References PD_TID, and thread_info::ptid.
Referenced by sync_threadlists().
static void init_aix_thread_ops | ( | void | ) | [static] |
Definition at line 1818 of file aix-thread.c.
References _, aix_thread_attach(), aix_thread_detach(), aix_thread_extra_thread_info(), aix_thread_fetch_registers(), aix_thread_get_ada_task_ptid(), aix_thread_mourn_inferior(), aix_thread_ops, aix_thread_pid_to_str(), aix_thread_resume(), aix_thread_store_registers(), aix_thread_thread_alive(), aix_thread_wait(), aix_thread_xfer_partial(), OPS_MAGIC, thread_stratum, target_ops::to_attach, target_ops::to_detach, target_ops::to_doc, target_ops::to_extra_thread_info, 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_wait, and target_ops::to_xfer_partial.
Referenced by _initialize_aix_thread().
static int iter_tid | ( | struct thread_info * | thread, |
void * | tidp | ||
) | [static] |
Definition at line 808 of file aix-thread.c.
References thread_info::private, pthdb_tid_t, and private_thread_info::tid.
Referenced by pd_update().
static void new_objfile | ( | struct objfile * | objfile | ) | [static] |
Definition at line 948 of file aix-thread.c.
References pd_disable(), and pd_enable().
Referenced by _initialize_aix_thread(), and symbol_file_add_separate().
Definition at line 580 of file aix-thread.c.
References pd_thread::pthid.
Referenced by sync_threadlists().
static ptid_t pd_activate | ( | int | set_infpid | ) | [static] |
Definition at line 857 of file aix-thread.c.
References arch64, inferior_ptid, pd_active, pd_callbacks, pd_session, pd_update(), PD_USER, and exsummary::status.
Referenced by aix_thread_attach(), aix_thread_wait(), and pd_enable().
static void pd_deactivate | ( | void | ) | [static] |
Definition at line 875 of file aix-thread.c.
References inferior_ptid, pd_active, pd_session, and pid_to_prc().
Referenced by aix_thread_mourn_inferior(), and pd_disable().
static void pd_disable | ( | void | ) | [static] |
Definition at line 930 of file aix-thread.c.
References aix_thread_ops, pd_able, pd_active, pd_deactivate(), and unpush_target().
Referenced by aix_thread_detach(), and new_objfile().
static void pd_enable | ( | void | ) | [static] |
Definition at line 889 of file aix-thread.c.
References aix_thread_ops, arch64, create_thread_event_breakpoint(), lookup_minimal_symbol(), pd_able, pd_activate(), pd_brk_addr, pd_callbacks, PD_USER, push_target(), register_size(), exsummary::status, SYMBOL_VALUE_ADDRESS, and target_gdbarch().
Referenced by new_objfile().
static char* pd_status2str | ( | int | status | ) | [static] |
Definition at line 160 of file aix-thread.c.
Referenced by fetch_regs_user_thread(), pdc_read_data(), pdc_write_data(), and store_regs_user_thread().
Definition at line 820 of file aix-thread.c.
References get_signaled_thread(), inferior_ptid, iter_tid(), iterate_over_threads(), pd_active, pd_session, pthdb_tid_t, thread_info::ptid, exsummary::status, and sync_threadlists().
Referenced by aix_thread_wait(), and pd_activate().
Definition at line 500 of file aix-thread.c.
References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, PDC_FAILURE, PDC_SUCCESS, and xmalloc().
static int pdc_dealloc | ( | pthdb_user_t | user, |
void * | buf | ||
) | [static] |
Definition at line 539 of file aix-thread.c.
References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, PDC_SUCCESS, and xfree().
static int pdc_read_data | ( | pthdb_user_t | user, |
void * | buf, | ||
pthdb_addr_t | addr, | ||
size_t | len | ||
) | [static] |
Definition at line 455 of file aix-thread.c.
References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), pd_status2str(), PDC_FAILURE, PDC_SUCCESS, exsummary::status, and target_read_memory().
static int pdc_read_regs | ( | pthdb_user_t | user, |
pthdb_tid_t | tid, | ||
unsigned long long | flags, | ||
pthdb_context_t * | context | ||
) | [static] |
Definition at line 333 of file aix-thread.c.
References addr_ptr, arch64, debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), memcpy(), memset(), ppc_num_fprs, ppc_num_gprs, ptrace32(), and ptrace64aix().
static int pdc_realloc | ( | pthdb_user_t | user, |
void * | buf, | ||
size_t | len, | ||
void ** | bufp | ||
) | [static] |
Definition at line 522 of file aix-thread.c.
References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, PDC_FAILURE, PDC_SUCCESS, and xrealloc().
static int pdc_symbol_addrs | ( | pthdb_user_t | user, |
pthdb_symbol_t * | symbols, | ||
int | count | ||
) | [static] |
Definition at line 287 of file aix-thread.c.
References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), lookup_minimal_symbol(), name, PDC_FAILURE, PDC_SUCCESS, and SYMBOL_VALUE_ADDRESS.
static int pdc_write_data | ( | pthdb_user_t | user, |
void * | buf, | ||
pthdb_addr_t | addr, | ||
size_t | len | ||
) | [static] |
Definition at line 477 of file aix-thread.c.
References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), pd_status2str(), PDC_FAILURE, PDC_SUCCESS, exsummary::status, and target_write_memory().
static int pdc_write_regs | ( | pthdb_user_t | user, |
pthdb_tid_t | tid, | ||
unsigned long long | flags, | ||
pthdb_context_t * | context | ||
) | [static] |
Definition at line 405 of file aix-thread.c.
References addr_ptr, arch64, debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), ptrace32(), and ptrace64aix().
static void pid_to_prc | ( | ptid_t * | ptidp | ) | [static] |
Definition at line 274 of file aix-thread.c.
References PD_TID, pid_to_ptid(), and ptid_get_pid().
Referenced by aix_thread_wait(), and pd_deactivate().
Definition at line 623 of file aix-thread.c.
References ptid_get_lwp(), ptid_get_pid(), and ptid_get_tid().
Referenced by gcmp(), and sync_threadlists().
Definition at line 263 of file aix-thread.c.
References ptrace(), and ptrace_check().
Referenced by aix_thread_resume(), fetch_regs_kernel_thread(), pdc_read_regs(), pdc_write_regs(), and store_regs_kernel_thread().
Definition at line 244 of file aix-thread.c.
References ptrace_check().
Referenced by aix_thread_resume(), fetch_regs_kernel_thread(), pdc_read_regs(), pdc_write_regs(), and store_regs_kernel_thread().
static int ptrace_check | ( | int | req, |
int | id, | ||
int | ret | ||
) | [static] |
Definition at line 204 of file aix-thread.c.
References _, debug_aix_thread, error(), fprintf_unfiltered(), gdb_stdlog, and safe_strerror().
Referenced by ptrace32(), and ptrace64aix().
static int special_register_p | ( | struct gdbarch * | gdbarch, |
int | regno | ||
) | [static] |
Definition at line 1097 of file aix-thread.c.
References gdbarch_pc_regnum(), gdbarch_tdep(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_mq_regnum, gdbarch_tdep::ppc_ps_regnum, and gdbarch_tdep::ppc_xer_regnum.
Referenced by fetch_regs_kernel_thread(), and store_regs_kernel_thread().
static char* state2str | ( | pthdb_state_t | state | ) | [static] |
Definition at line 552 of file aix-thread.c.
References _.
Referenced by aix_thread_extra_thread_info().
static void store_regs_kernel_thread | ( | const struct regcache * | regcache, |
int | regno, | ||
pthdb_tid_t | tid | ||
) | [static] |
Definition at line 1552 of file aix-thread.c.
References addr_ptr, arch64, debug_aix_thread, fill_fprs(), fill_gprs32(), fill_gprs64(), fill_sprs32(), fill_sprs64(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, gdbarch_tdep(), get_regcache_arch(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_mq_regnum, ppc_num_fprs, ppc_num_gprs, ptrace32(), ptrace64aix(), REG_VALID, regcache_raw_collect(), regcache_register_status(), and special_register_p().
Referenced by aix_thread_store_registers().
static void store_regs_user_thread | ( | const struct regcache * | regcache, |
pthdb_pthread_t | pdtid | ||
) | [static] |
Definition at line 1456 of file aix-thread.c.
References _, arch64, debug_aix_thread, error(), fill_fprs(), fill_sprs32(), fill_sprs64(), fprintf_unfiltered(), gdb_stdlog, gdbarch_pc_regnum(), gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::int32, gdbarch_tdep::int64, pd_session, pd_status2str(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, ppc_floating_point_unit_p(), gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_lr_regnum, ppc_num_gprs, gdbarch_tdep::ppc_ps_regnum, gdbarch_tdep::ppc_xer_regnum, REG_VALID, regcache_raw_collect(), regcache_register_status(), and exsummary::status.
Referenced by aix_thread_store_registers().
static void supply_fprs | ( | struct regcache * | regcache, |
double * | vals | ||
) | [static] |
Definition at line 1078 of file aix-thread.c.
References gdb_assert, gdbarch_tdep(), get_regcache_arch(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_fp0_regnum, ppc_num_fprs, and regcache_raw_supply().
Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().
static void supply_gprs64 | ( | struct regcache * | regcache, |
uint64_t * | vals | ||
) | [static] |
Definition at line 1057 of file aix-thread.c.
References gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, and regcache_raw_supply().
Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().
static void supply_reg32 | ( | struct regcache * | regcache, |
int | regno, | ||
uint32_t | val | ||
) | [static] |
Definition at line 1070 of file aix-thread.c.
References regcache_raw_supply().
Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().
static void supply_sprs32 | ( | struct regcache * | regcache, |
uint32_t | iar, | ||
uint32_t | msr, | ||
uint32_t | cr, | ||
uint32_t | lr, | ||
uint32_t | ctr, | ||
uint32_t | xer, | ||
uint32_t | fpscr | ||
) | [static] |
Definition at line 1140 of file aix-thread.c.
References gdbarch_pc_regnum(), gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_ps_regnum, gdbarch_tdep::ppc_xer_regnum, and regcache_raw_supply().
Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().
static void supply_sprs64 | ( | struct regcache * | regcache, |
uint64_t | iar, | ||
uint64_t | msr, | ||
uint32_t | cr, | ||
uint64_t | lr, | ||
uint64_t | ctr, | ||
uint32_t | xer, | ||
uint32_t | fpscr | ||
) | [static] |
Definition at line 1116 of file aix-thread.c.
References gdbarch_pc_regnum(), gdbarch_tdep(), get_regcache_arch(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_ps_regnum, gdbarch_tdep::ppc_xer_regnum, and regcache_raw_supply().
Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().
static void sync_threadlists | ( | void | ) | [static] |
Definition at line 692 of file aix-thread.c.
References add_thread(), delete_thread(), gcmp(), giter_accum(), giter_count(), inferior_ptid, iterate_over_threads(), pcmp(), pd_session, private_thread_info::pdtid, pd_thread::pdtid, thread_info::private, pthdb_tid_t, pd_thread::pthid, ptid_build(), ptid_cmp(), ptid_get_pid(), qsort, exsummary::status, ptid::tid, private_thread_info::tid, pd_thread::tid, xfree(), xmalloc(), and xrealloc().
Referenced by pd_update().
struct target_ops aix_thread_ops [static] |
Definition at line 103 of file aix-thread.c.
Referenced by _initialize_aix_thread(), init_aix_thread_ops(), pd_disable(), and pd_enable().
Definition at line 121 of file aix-thread.c.
Referenced by aix_thread_resume(), fetch_regs_kernel_thread(), fetch_regs_user_thread(), pd_activate(), pd_enable(), pdc_read_regs(), pdc_write_regs(), rs6000_xfer_partial(), store_regs_kernel_thread(), and store_regs_user_thread().
int debug_aix_thread [static] |
Definition at line 65 of file aix-thread.c.
Referenced by _initialize_aix_thread(), fetch_regs_kernel_thread(), fetch_regs_user_thread(), pdc_alloc(), pdc_dealloc(), pdc_read_data(), pdc_read_regs(), pdc_realloc(), pdc_symbol_addrs(), pdc_write_data(), pdc_write_regs(), ptrace_check(), store_regs_kernel_thread(), and store_regs_user_thread().
Definition at line 112 of file aix-thread.c.
Referenced by pd_disable(), and pd_enable().
Definition at line 116 of file aix-thread.c.
Referenced by aix_thread_wait(), pd_activate(), pd_deactivate(), pd_disable(), and pd_update().
CORE_ADDR pd_brk_addr [static] |
Definition at line 108 of file aix-thread.c.
Referenced by aix_thread_wait(), and pd_enable().
pthdb_callbacks_t pd_callbacks [static] |
{ pdc_symbol_addrs, pdc_read_data, pdc_write_data, pdc_read_regs, pdc_write_regs, pdc_alloc, pdc_realloc, pdc_dealloc, NULL }
Definition at line 140 of file aix-thread.c.
Referenced by pd_activate(), and pd_enable().
pthdb_session_t pd_session [static] |
Definition at line 154 of file aix-thread.c.
Referenced by aix_thread_extra_thread_info(), fetch_regs_user_thread(), pd_activate(), pd_deactivate(), pd_update(), store_regs_user_thread(), and sync_threadlists().