GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/aix-thread.c File Reference
`#include "defs.h"`
`#include "gdbthread.h"`
`#include "target.h"`
`#include "inferior.h"`
`#include "regcache.h"`
`#include "gdbcmd.h"`
`#include "ppc-tdep.h"`
`#include "observer.h"`
`#include "objfiles.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 | aix_thread_info
struct | pd_thread

## Macros
#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 aix_thread_info * | get_aix_thread_info (thread_info *thread)
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 const 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_inferior_created (struct target_ops *ops, int from_tty)
static void | aix_thread_detach (struct target_ops *ops, const 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 enum target_xfer_status | aix_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 | aix_thread_mourn_inferior (struct target_ops *ops)
static int | aix_thread_thread_alive (struct target_ops *ops, ptid_t ptid)
static const char * | aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid)
static const char * | aix_thread_extra_thread_info (struct target_ops *self, struct thread_info *thread)
static ptid_t | aix_thread_get_ada_task_ptid (struct target_ops *self, 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

## Macro Definition Documentation

## ◆ addr_ptr

#define addr_ptr int *

Definition at line 267 of file aix-thread.c.

Referenced by aix_thread_resume().

## ◆ PD_TID

#define PD_TID | ( |  | ptid | ) | (pd_active && ptid_get_tid (ptid) != 0)

Definition at line 73 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().

## ◆ PD_USER

#define PD_USER 1

Definition at line 78 of file aix-thread.c.

Referenced by pd_activate(), and pd_enable().

## ◆ PDC_FAILURE

#define PDC_FAILURE PTHDB_CALLBACK

Definition at line 83 of file aix-thread.c.

Referenced by pdc_alloc(), pdc_read_data(), pdc_realloc(), pdc_symbol_addrs(), and pdc_write_data().

## ◆ PDC_SUCCESS

#define PDC_SUCCESS PTHDB_SUCCESS

Definition at line 82 of file aix-thread.c.

Referenced by pdc_alloc(), pdc_dealloc(), pdc_read_data(), pdc_realloc(), pdc_symbol_addrs(), and pdc_write_data().

## ◆ pthdb_tid_t

#define pthdb_tid_t tid_t

Definition at line 68 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().

## Function Documentation

## ◆ _initialize_aix_thread()

void _initialize_aix_thread | ( | void |  | ) |

Definition at line 1856 of file aix-thread.c.

References _, add_setshow_boolean_cmd(), aix_thread_inferior_created(), aix_thread_ops, class_maintenance, complete_target_initialization(), debug_aix_thread, init_aix_thread_ops(), new_objfile(), observer_attach_inferior_created(), observer_attach_new_objfile(), setdebuglist, and showdebuglist.

## ◆ aix_thread_detach()

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

Definition at line 984 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().

## ◆ aix_thread_extra_thread_info()

static const char* aix_thread_extra_thread_info | ( | struct target_ops * | self,
|  | struct thread_info * | thread
| ) |  |
| static

Definition at line 1766 of file aix-thread.c.

References _, string_file::c_str(), get_aix_thread_info(), pd_session, PD_TID, aix_thread_info::pdtid, ui_file::printf(), pthdb_tid_t, thread_info::ptid, state2str(), status, selftests::ptid::tid, aix_thread_info::tid, string_file::write(), and xfree().

Referenced by init_aix_thread_ops().

## ◆ aix_thread_fetch_registers()

static void aix_thread_fetch_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 1323 of file aix-thread.c.

References target_ops::beneath, fetch_regs_kernel_thread(), fetch_regs_user_thread(), find_target_beneath(), find_thread_ptid(), get_aix_thread_info(), PD_TID, aix_thread_info::pdtid, pthdb_tid_t, regcache_get_ptid(), selftests::ptid::tid, aix_thread_info::tid, and target_ops::to_fetch_registers.

Referenced by init_aix_thread_ops().

## ◆ aix_thread_get_ada_task_ptid()

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

Definition at line 1823 of file aix-thread.c.

References inferior_ptid, ptid_build(), and ptid_get_pid().

Referenced by init_aix_thread_ops().

## ◆ aix_thread_inferior_created()

static void aix_thread_inferior_created | ( | struct target_ops * | ops,
|  | int | from_tty
| ) |  |
| static

Definition at line 976 of file aix-thread.c.

References pd_enable().

Referenced by _initialize_aix_thread().

## ◆ aix_thread_mourn_inferior()

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

Definition at line 1719 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().

## ◆ aix_thread_pid_to_str()

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

Definition at line 1746 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().

## ◆ aix_thread_resume()

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

Definition at line 996 of file aix-thread.c.

References _, addr_ptr, arch64, target_ops::beneath, error(), find_target_beneath(), find_thread_ptid(), gdb_signal_to_host(), get_aix_thread_info(), inferior_ptid, make_scoped_restore(), PD_TID, pid_to_ptid(), pthdb_tid_t, thread_info::ptid, ptid_get_lwp(), ptid_get_pid(), ptrace32(), ptrace64aix(), selftests::ptid::tid, aix_thread_info::tid, and target_ops::to_resume.

Referenced by init_aix_thread_ops().

## ◆ aix_thread_store_registers()

static void aix_thread_store_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 1678 of file aix-thread.c.

References target_ops::beneath, find_target_beneath(), find_thread_ptid(), get_aix_thread_info(), PD_TID, aix_thread_info::pdtid, pthdb_tid_t, regcache_get_ptid(), store_regs_kernel_thread(), store_regs_user_thread(), selftests::ptid::tid, aix_thread_info::tid, and target_ops::to_store_registers.

Referenced by init_aix_thread_ops().

## ◆ aix_thread_thread_alive()

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

Definition at line 1730 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().

## ◆ aix_thread_wait()

static ptid_t aix_thread_wait | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | struct target_waitstatus * | status,
|  | int | options
| ) |  |
| static

Definition at line 1039 of file aix-thread.c.

References regcache::arch(), target_ops::beneath, find_target_beneath(), gdbarch_decr_pc_after_break(), get_thread_regcache(), inferior_ptid, make_scoped_restore(), pd_activate(), pd_active, pd_brk_addr, pd_update(), pid_to_prc(), pid_to_ptid(), regcache::ptid(), ptid_get_pid(), regcache_read_pc(), status, TARGET_WAITKIND_STOPPED, and target_ops::to_wait.

Referenced by init_aix_thread_ops().

## ◆ aix_thread_xfer_partial()

static enum target_xfer_status aix_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 1703 of file aix-thread.c.

References target_ops::beneath, find_target_beneath(), inferior_ptid, make_scoped_restore(), offset, pid_to_ptid(), ptid_get_pid(), and target_ops::to_xfer_partial.

Referenced by init_aix_thread_ops().

## ◆ fetch_regs_kernel_thread()

static void fetch_regs_kernel_thread | ( | struct regcache * | regcache,
|  | int | regno,
|  | pthdb_tid_t | tid
| ) |  |
| static

Definition at line 1239 of file aix-thread.c.

References regcache::arch(), arch64, debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, gdbarch_tdep(), 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(), supply_sprs64(), and selftests::ptid::tid.

Referenced by aix_thread_fetch_registers().

## ◆ fetch_regs_user_thread()

static void fetch_regs_user_thread | ( | struct regcache * | regcache,
|  | pthdb_pthread_t | pdtid
| ) |  |
| static

Definition at line 1185 of file aix-thread.c.

References _, regcache::arch(), arch64, debug_aix_thread, error(), fprintf_unfiltered(), gdb_stdlog, gdbarch_tdep(), pd_session, pd_status2str(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, status, supply_fprs(), supply_gprs64(), supply_reg32(), supply_sprs32(), and supply_sprs64().

Referenced by aix_thread_fetch_registers().

## ◆ fill_fprs()

static void fill_fprs | ( | const struct regcache * | regcache,
|  | double * | vals
| ) |  |
| static

Definition at line 1375 of file aix-thread.c.

References regcache::arch(), gdb_assert, gdbarch_tdep(), 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().

## ◆ fill_gprs32()

static void fill_gprs32 | ( | const struct regcache * | regcache,
|  | uint32_t * | vals
| ) |  |
| static

Definition at line 1361 of file aix-thread.c.

References regcache::arch(), gdbarch_tdep(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, REG_VALID, regcache_raw_collect(), and regcache_register_status().

Referenced by store_regs_kernel_thread().

## ◆ fill_gprs64()

static void fill_gprs64 | ( | const struct regcache * | regcache,
|  | uint64_t * | vals
| ) |  |
| static

Definition at line 1348 of file aix-thread.c.

References regcache::arch(), gdbarch_tdep(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, REG_VALID, regcache_raw_collect(), and regcache_register_status().

Referenced by store_regs_kernel_thread().

## ◆ fill_sprs32()

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 1433 of file aix-thread.c.

References regcache::arch(), gdb_assert, 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_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().

## ◆ fill_sprs64()

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 1397 of file aix-thread.c.

References regcache::arch(), gdb_assert, 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_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().

## ◆ gcmp()

static int gcmp | ( | const void * | t1v,
|  | const void * | t2v
| ) |  |
| static

Definition at line 655 of file aix-thread.c.

References thread_info::ptid, and ptid_cmp().

Referenced by sync_threadlists().

## ◆ get_aix_thread_info()

static aix_thread_info* get_aix_thread_info | ( | thread_info * | thread | ) |
| static

Definition at line 96 of file aix-thread.c.

References thread_info::priv.

Referenced by aix_thread_extra_thread_info(), aix_thread_fetch_registers(), aix_thread_resume(), aix_thread_store_registers(), iter_tid(), and sync_threadlists().

## ◆ get_signaled_thread()

static pthdb_tid_t get_signaled_thread | ( | void |  | ) |
| static

Definition at line 667 of file aix-thread.c.

References getthrds(), inferior_ptid, and ptid_get_pid().

Referenced by pd_update().

## ◆ getthrds()

int getthrds | ( | pid_t | ,
|  | struct thrdsinfo64 * | ,
|  | int | ,
|  | tid_t * | ,
|  | int |
| ) |  |

Referenced by get_signaled_thread().

## ◆ giter_accum()

static int giter_accum | ( | struct thread_info * | thread,
|  | void * | bufp
| ) |  |
| static

Definition at line 619 of file aix-thread.c.

References PD_TID, and thread_info::ptid.

Referenced by sync_threadlists().

## ◆ giter_count()

static int giter_count | ( | struct thread_info * | thread,
|  | void * | countp
| ) |  |
| static

Definition at line 604 of file aix-thread.c.

References PD_TID, and thread_info::ptid.

Referenced by sync_threadlists().

## ◆ init_aix_thread_ops()

static void init_aix_thread_ops | ( | void |  | ) |
| static

Definition at line 1831 of file aix-thread.c.

References _, 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_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().

## ◆ iter_tid()

static int iter_tid | ( | struct thread_info * | thread,
|  | void * | tidp
| ) |  |
| static

Definition at line 823 of file aix-thread.c.

References get_aix_thread_info(), pthdb_tid_t, selftests::ptid::tid, and aix_thread_info::tid.

Referenced by pd_update().

## ◆ new_objfile()

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

Definition at line 965 of file aix-thread.c.

References pd_disable(), and pd_enable().

Referenced by _initialize_aix_thread().

## ◆ pcmp()

static int pcmp | ( | const void * | p1v,
|  | const void * | p2v
| ) |  |
| static

Definition at line 589 of file aix-thread.c.

References pd_thread::pthid.

Referenced by sync_threadlists().

## ◆ pd_activate()

static ptid_t pd_activate | ( | int | set_infpid | ) |
| static

Definition at line 873 of file aix-thread.c.

References arch64, inferior_ptid, pd_active, pd_callbacks, pd_session, pd_update(), PD_USER, and status.

Referenced by aix_thread_wait(), and pd_enable().

## ◆ pd_deactivate()

static void pd_deactivate | ( | void |  | ) |
| static

Definition at line 891 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().

## ◆ pd_disable()

static void pd_disable | ( | void |  | ) |
| static

Definition at line 947 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().

## ◆ pd_enable()

static void pd_enable | ( | void |  | ) |
| static

Definition at line 905 of file aix-thread.c.

References aix_thread_ops, arch64, BMSYMBOL_VALUE_ADDRESS, create_thread_event_breakpoint(), lookup_minimal_symbol(), bound_minimal_symbol::minsym, pd_able, pd_activate(), pd_brk_addr, pd_callbacks, PD_USER, push_target(), register_size(), status, and target_gdbarch().

Referenced by aix_thread_inferior_created(), and new_objfile().

## ◆ pd_status2str()

static const char* pd_status2str | ( | int | status | ) |
| static

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

References status.

Referenced by fetch_regs_user_thread(), pdc_read_data(), pdc_write_data(), and store_regs_user_thread().

## ◆ pd_update()

static ptid_t pd_update | ( | int | set_infpid | ) |
| static

Definition at line 836 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, status, sync_threadlists(), and selftests::ptid::tid.

Referenced by aix_thread_wait(), and pd_activate().

## ◆ pdc_alloc()

static int pdc_alloc | ( | pthdb_user_t | user,
|  | size_t | len,
|  | void ** | bufp
| ) |  |
| static

Definition at line 509 of file aix-thread.c.

References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, PDC_FAILURE, PDC_SUCCESS, and xmalloc().

## ◆ pdc_dealloc()

static int pdc_dealloc | ( | pthdb_user_t | user,
|  | void * | buf
| ) |  |
| static

Definition at line 548 of file aix-thread.c.

References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, PDC_SUCCESS, and xfree().

## ◆ pdc_read_data()

static int pdc_read_data | ( | pthdb_user_t | user,
|  | void * | buf,
|  | pthdb_addr_t | addr,
|  | size_t | len
| ) |  |
| static

Definition at line 464 of file aix-thread.c.

References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), pd_status2str(), PDC_FAILURE, PDC_SUCCESS, status, and target_read_memory().

## ◆ pdc_read_regs()

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 342 of file aix-thread.c.

References arch64, debug_aix_thread, flags, fprintf_unfiltered(), gdb_stdlog, hex_string(), memset(), ppc_num_fprs, ppc_num_gprs, ptrace32(), ptrace64aix(), and selftests::ptid::tid.

## ◆ pdc_realloc()

static int pdc_realloc | ( | pthdb_user_t | user,
|  | void * | buf,
|  | size_t | len,
|  | void ** | bufp
| ) |  |
| static

Definition at line 531 of file aix-thread.c.

References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, PDC_FAILURE, PDC_SUCCESS, and xrealloc().

## ◆ pdc_symbol_addrs()

static int pdc_symbol_addrs | ( | pthdb_user_t | user,
|  | pthdb_symbol_t * | symbols,
|  | int | count
| ) |  |
| static

Definition at line 295 of file aix-thread.c.

References BMSYMBOL_VALUE_ADDRESS, debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), lookup_minimal_symbol(), bound_minimal_symbol::minsym, name, PDC_FAILURE, and PDC_SUCCESS.

## ◆ pdc_write_data()

static int pdc_write_data | ( | pthdb_user_t | user,
|  | void * | buf,
|  | pthdb_addr_t | addr,
|  | size_t | len
| ) |  |
| static

Definition at line 486 of file aix-thread.c.

References debug_aix_thread, fprintf_unfiltered(), gdb_stdlog, hex_string(), pd_status2str(), PDC_FAILURE, PDC_SUCCESS, status, and target_write_memory().

## ◆ pdc_write_regs()

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 414 of file aix-thread.c.

References arch64, debug_aix_thread, flags, fprintf_unfiltered(), gdb_stdlog, hex_string(), ptrace32(), ptrace64aix(), and selftests::ptid::tid.

## ◆ pid_to_prc()

static void pid_to_prc | ( | ptid_t * | ptidp | ) |
| static

Definition at line 282 of file aix-thread.c.

References PD_TID, pid_to_ptid(), and ptid_get_pid().

Referenced by aix_thread_wait(), and pd_deactivate().

## ◆ ptid_cmp()

static int ptid_cmp | ( | ptid_t | ptid1,
|  | ptid_t | ptid2
| ) |  |
| static

Definition at line 632 of file aix-thread.c.

References ptid_get_lwp(), ptid_get_pid(), and ptid_get_tid().

Referenced by gcmp(), and sync_threadlists().

## ◆ ptrace32()

static int ptrace32 | ( | int | req,
|  | int | id,
|  | addr_ptr | addr,
|  | int | data,
|  | int * | buf
| ) |  |
| static

Definition at line 271 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().

## ◆ ptrace64aix()

static int ptrace64aix | ( | int | req,
|  | int | id,
|  | long long | addr,
|  | int | data,
|  | int * | buf
| ) |  |
| static

Definition at line 252 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().

## ◆ ptrace_check()

static int ptrace_check | ( | int | req,
|  | int | id,
|  | int | ret
| ) |  |
| static

Definition at line 212 of file aix-thread.c.

References _, debug_aix_thread, error(), fprintf_unfiltered(), gdb_stdlog, and safe_strerror().

Referenced by ptrace32(), and ptrace64aix().

## ◆ special_register_p()

static int special_register_p | ( | struct gdbarch * | gdbarch,
|  | int | regno
| ) |  |
| static

Definition at line 1114 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().

## ◆ state2str()

static char* state2str | ( | pthdb_state_t | state | ) |
| static

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

References _.

Referenced by aix_thread_extra_thread_info().

## ◆ store_regs_kernel_thread()

static void store_regs_kernel_thread | ( | const struct regcache * | regcache,
|  | int | regno,
|  | pthdb_tid_t | tid
| ) |  |
| static

Definition at line 1570 of file aix-thread.c.

References regcache::arch(), arch64, debug_aix_thread, fill_fprs(), fill_gprs32(), fill_gprs64(), fill_sprs32(), fill_sprs64(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, gdbarch_tdep(), 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(), special_register_p(), and selftests::ptid::tid.

Referenced by aix_thread_store_registers().

## ◆ store_regs_user_thread()

static void store_regs_user_thread | ( | const struct regcache * | regcache,
|  | pthdb_pthread_t | pdtid
| ) |  |
| static

Definition at line 1474 of file aix-thread.c.

References _, regcache::arch(), arch64, debug_aix_thread, error(), fill_fprs(), fill_sprs32(), fill_sprs64(), fprintf_unfiltered(), gdb_stdlog, gdbarch_pc_regnum(), gdbarch_tdep(), 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 status.

Referenced by aix_thread_store_registers().

## ◆ supply_fprs()

static void supply_fprs | ( | struct regcache * | regcache,
|  | double * | vals
| ) |  |
| static

Definition at line 1095 of file aix-thread.c.

References regcache::arch(), gdb_assert, gdbarch_tdep(), 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().

## ◆ supply_gprs64()

static void supply_gprs64 | ( | struct regcache * | regcache,
|  | uint64_t * | vals
| ) |  |
| static

Definition at line 1074 of file aix-thread.c.

References regcache::arch(), gdbarch_tdep(), gdbarch_tdep::ppc_gp0_regnum, ppc_num_gprs, and regcache_raw_supply().

Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().

## ◆ supply_reg32()

static void supply_reg32 | ( | struct regcache * | regcache,
|  | int | regno,
|  | uint32_t | val
| ) |  |
| static

Definition at line 1087 of file aix-thread.c.

References regcache_raw_supply().

Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().

## ◆ supply_sprs32()

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 1157 of file aix-thread.c.

References regcache::arch(), 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_ps_regnum, gdbarch_tdep::ppc_xer_regnum, and regcache_raw_supply().

Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().

## ◆ supply_sprs64()

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 1133 of file aix-thread.c.

References regcache::arch(), 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_ps_regnum, gdbarch_tdep::ppc_xer_regnum, and regcache_raw_supply().

Referenced by fetch_regs_kernel_thread(), and fetch_regs_user_thread().

## ◆ sync_threadlists()

static void sync_threadlists | ( | void |  | ) |
| static

Definition at line 701 of file aix-thread.c.

References add_thread(), add_thread_with_info(), delete_thread(), gcmp(), get_aix_thread_info(), giter_accum(), giter_count(), inferior_ptid, iterate_over_threads(), pcmp(), pd_session, aix_thread_info::pdtid, pd_thread::pdtid, thread_info::priv, pthdb_tid_t, pd_thread::pthid, thread_info::ptid, ptid_build(), ptid_cmp(), ptid_get_pid(), qsort, status, selftests::ptid::tid, aix_thread_info::tid, pd_thread::tid, xfree(), XNEWVEC, and xrealloc().

Referenced by pd_update().

## Variable Documentation

## ◆ aix_thread_ops

struct target_ops aix_thread_ops
| static

Definition at line 111 of file aix-thread.c.

Referenced by _initialize_aix_thread(), init_aix_thread_ops(), pd_disable(), and pd_enable().

## ◆ arch64

int arch64
| static

Definition at line 129 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().

## ◆ debug_aix_thread

int debug_aix_thread
| static

Definition at line 64 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().

## ◆ pd_able

int pd_able = 0
| static

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

Referenced by pd_disable(), and pd_enable().

## ◆ pd_active

int pd_active = 0
| static

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

Referenced by aix_thread_wait(), pd_activate(), pd_deactivate(), pd_disable(), and pd_update().

## ◆ pd_brk_addr

CORE_ADDR pd_brk_addr
| static

Definition at line 116 of file aix-thread.c.

Referenced by aix_thread_wait(), and pd_enable().

## ◆ pd_callbacks

pthdb_callbacks_t pd_callbacks
| static

Initial value:
= {
pdc_symbol_addrs,
pdc_read_data,
pdc_write_data,
pdc_read_regs,
pdc_write_regs,
pdc_alloc,
pdc_realloc,
pdc_dealloc,
NULL
}
pdc_read_data
static int pdc_read_data(pthdb_user_t, void *, pthdb_addr_t, size_t)
Definition: aix-thread.c:464
pdc_alloc
static int pdc_alloc(pthdb_user_t, size_t, void **)
Definition: aix-thread.c:509
pdc_write_regs
static int pdc_write_regs(pthdb_user_t user, pthdb_tid_t tid, unsigned long long flags, pthdb_context_t *context)
Definition: aix-thread.c:414
pdc_write_data
static int pdc_write_data(pthdb_user_t, void *, pthdb_addr_t, size_t)
Definition: aix-thread.c:486
pdc_symbol_addrs
static int pdc_symbol_addrs(pthdb_user_t, pthdb_symbol_t *, int)
Definition: aix-thread.c:295
pdc_realloc
static int pdc_realloc(pthdb_user_t, void *, size_t, void **)
Definition: aix-thread.c:531
pdc_read_regs
static int pdc_read_regs(pthdb_user_t user, pthdb_tid_t tid, unsigned long long flags, pthdb_context_t *context)
Definition: aix-thread.c:342
pdc_dealloc
static int pdc_dealloc(pthdb_user_t, void *)
Definition: aix-thread.c:548

Definition at line 148 of file aix-thread.c.

Referenced by pd_activate(), and pd_enable().

## ◆ pd_session

pthdb_session_t pd_session
| static

Definition at line 162 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().