53 #include <sys/types.h>
54 #include <sys/ptrace.h>
57 #include <sys/pthdebug.h>
59 #if !HAVE_DECL_GETTHRDS
60 extern int getthrds (pid_t,
struct thrdsinfo64 *,
int, tid_t *,
int);
67 #ifndef PTHDB_VERSION_3
68 #define pthdb_tid_t tid_t
73 #define PD_TID(ptid) (pd_active && ptid_get_tid (ptid) != 0)
82 #define PDC_SUCCESS PTHDB_SUCCESS
83 #define PDC_FAILURE PTHDB_CALLBACK
125 static int pdc_read_data (pthdb_user_t,
void *, pthdb_addr_t,
size_t);
126 static int pdc_write_data (pthdb_user_t,
void *, pthdb_addr_t,
size_t);
128 unsigned long long flags,
129 pthdb_context_t *context);
131 unsigned long long flags,
132 pthdb_context_t *context);
133 static int pdc_alloc (pthdb_user_t,
size_t,
void **);
134 static int pdc_realloc (pthdb_user_t,
void *,
size_t,
void **);
163 case PTHDB_SUCCESS:
return "SUCCESS";
164 case PTHDB_NOSYS:
return "NOSYS";
165 case PTHDB_NOTSUP:
return "NOTSUP";
166 case PTHDB_BAD_VERSION:
return "BAD_VERSION";
167 case PTHDB_BAD_USER:
return "BAD_USER";
168 case PTHDB_BAD_SESSION:
return "BAD_SESSION";
169 case PTHDB_BAD_MODE:
return "BAD_MODE";
170 case PTHDB_BAD_FLAGS:
return "BAD_FLAGS";
171 case PTHDB_BAD_CALLBACK:
return "BAD_CALLBACK";
172 case PTHDB_BAD_POINTER:
return "BAD_POINTER";
173 case PTHDB_BAD_CMD:
return "BAD_CMD";
174 case PTHDB_BAD_PTHREAD:
return "BAD_PTHREAD";
175 case PTHDB_BAD_ATTR:
return "BAD_ATTR";
176 case PTHDB_BAD_MUTEX:
return "BAD_MUTEX";
177 case PTHDB_BAD_MUTEXATTR:
return "BAD_MUTEXATTR";
178 case PTHDB_BAD_COND:
return "BAD_COND";
179 case PTHDB_BAD_CONDATTR:
return "BAD_CONDATTR";
180 case PTHDB_BAD_RWLOCK:
return "BAD_RWLOCK";
181 case PTHDB_BAD_RWLOCKATTR:
return "BAD_RWLOCKATTR";
182 case PTHDB_BAD_KEY:
return "BAD_KEY";
183 case PTHDB_BAD_PTID:
return "BAD_PTID";
184 case PTHDB_BAD_TID:
return "BAD_TID";
185 case PTHDB_CALLBACK:
return "CALLBACK";
186 case PTHDB_CONTEXT:
return "CONTEXT";
187 case PTHDB_HELD:
return "HELD";
188 case PTHDB_NOT_HELD:
return "NOT_HELD";
189 case PTHDB_MEMORY:
return "MEMORY";
190 case PTHDB_NOT_PTHREADED:
return "NOT_PTHREADED";
191 case PTHDB_SYMBOL:
return "SYMBOL";
192 case PTHDB_NOT_AVAIL:
return "NOT_AVAIL";
193 case PTHDB_INTERNAL:
return "INTERNAL";
194 default:
return "UNKNOWN";
205 if (ret == 0 && !errno)
218 if (ret == -1 && errno == EPERM)
222 "ptrace (%d, %d) = %d (errno = %d)\n",
223 req,
id, ret, errno);
224 return ret == -1 ? 0 : 1;
228 error (
_(
"aix-thread: ptrace (%d, %d) returned %d (errno = %d %s)"),
238 # define ptracex(request, pid, addr, data, buf) \
239 ptrace64 (request, pid, addr, data, buf)
246 return ptrace_check (req,
id, ptracex (req,
id, addr, data, buf));
254 # define ptrace(request, pid, addr, data, buf) \
255 ptrace64 (request, pid, addr, data, buf)
256 # define addr_ptr long long
258 # define addr_ptr int *
266 ptrace (req,
id, addr, data, buf));
294 "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)\n",
295 user, (
long) symbols, count);
297 for (i = 0; i < count; i++)
299 name = symbols[i].name;
302 " symbols[%d].name = \"%s\"\n", i, name);
335 unsigned long long flags,
336 pthdb_context_t *context)
347 struct ptxsprs sprs64;
348 struct ptsprs sprs32;
355 if (flags & PTHDB_FLAG_GPRS)
360 (
unsigned long) gprs64, 0, NULL))
361 memset (gprs64, 0,
sizeof (gprs64));
362 memcpy (context->gpr, gprs64,
sizeof(gprs64));
366 if (!
ptrace32 (PTT_READ_GPRS, tid, (uintptr_t) gprs32, 0, NULL))
367 memset (gprs32, 0,
sizeof (gprs32));
368 memcpy (context->gpr, gprs32,
sizeof(gprs32));
373 if (flags & PTHDB_FLAG_FPRS)
375 if (!
ptrace32 (PTT_READ_FPRS, tid, (uintptr_t) fprs, 0, NULL))
376 memset (fprs, 0,
sizeof (fprs));
377 memcpy (context->fpr, fprs,
sizeof(fprs));
381 if (flags & PTHDB_FLAG_SPRS)
386 (
unsigned long) &sprs64, 0, NULL))
387 memset (&sprs64, 0,
sizeof (sprs64));
388 memcpy (&context->msr, &sprs64,
sizeof(sprs64));
392 if (!
ptrace32 (PTT_READ_SPRS, tid, (uintptr_t) &sprs32, 0, NULL))
393 memset (&sprs32, 0,
sizeof (sprs32));
394 memcpy (&context->msr, &sprs32,
sizeof(sprs32));
407 unsigned long long flags,
408 pthdb_context_t *context)
421 if (flags & PTHDB_FLAG_GPRS)
425 (
unsigned long) context->gpr, 0, NULL);
427 ptrace32 (PTT_WRITE_GPRS, tid, (uintptr_t) context->gpr, 0, NULL);
431 if (flags & PTHDB_FLAG_FPRS)
433 ptrace32 (PTT_WRITE_FPRS, tid, (uintptr_t) context->fpr, 0, NULL);
437 if (flags & PTHDB_FLAG_SPRS)
442 (
unsigned long) &context->msr, 0, NULL);
446 ptrace32 (PTT_WRITE_SPRS, tid, (uintptr_t) &context->msr, 0, NULL);
456 pthdb_addr_t addr,
size_t len)
462 "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
478 pthdb_addr_t addr,
size_t len)
484 "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
504 "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)\n",
505 user, len, (
long) bufp);
509 " malloc returned 0x%lx\n", (
long) *bufp);
526 "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n",
527 user, (
long) buf, len, (
long) bufp);
531 " realloc returned 0x%lx\n", (
long) *bufp);
543 "pdc_free (user = %ld, buf = 0x%lx)\n", user,
564 return _(
"sleeping");
570 return _(
"finished");
580 pcmp (
const void *p1v,
const void *p2v)
646 gcmp (
const void *t1v,
const void *t2v)
660 struct thrdsinfo64 thrinf;
667 sizeof (thrinf), &ktid, 1) != 1)
670 if (thrinf.ti_cursig == SIGTRAP)
671 return thrinf.ti_tid;
695 int pcount, psize, pi, gcount, gi;
698 pthdb_pthread_t pdtid;
708 for (cmd = PTHDB_LIST_FIRST;; cmd = PTHDB_LIST_NEXT)
710 status = pthdb_pthread (
pd_session, &pdtid, cmd);
711 if (status != PTHDB_SUCCESS || pdtid == PTHDB_INVALID_PTHREAD)
714 status = pthdb_pthread_ptid (
pd_session, pdtid, &pthid);
715 if (status != PTHDB_SUCCESS || pthid == PTHDB_INVALID_PTID)
722 psize *
sizeof *pbuf);
724 pbuf[pcount].pdtid =
pdtid;
725 pbuf[pcount].pthid =
pthid;
729 for (pi = 0; pi < pcount; pi++)
731 status = pthdb_pthread_tid (
pd_session, pbuf[pi].pdtid, &tid);
732 if (status != PTHDB_SUCCESS)
733 tid = PTHDB_INVALID_TID;
737 qsort (pbuf, pcount,
sizeof *pbuf,
pcmp);
745 qsort (gbuf, gcount,
sizeof *gbuf,
gcmp);
750 for (pi = gi = 0; pi < pcount || gi < gcount;)
757 else if (gi == gcount)
762 thread->
priv->
tid = pbuf[pi].tid;
770 pptid =
ptid_build (infpid, 0, pbuf[pi].pthid);
771 gptid = gbuf[gi]->ptid;
772 pdtid = pbuf[pi].pdtid;
775 cmp_result =
ptid_cmp (pptid, gptid);
779 gbuf[gi]->priv->pdtid = pdtid;
780 gbuf[gi]->priv->tid = tid;
784 else if (cmp_result > 0)
812 return (thread->
priv->
tid == tid);
831 if (status != PTHDB_SUCCESS)
861 status = pthdb_session_init (
PD_USER,
arch64 ? PEM_64BIT : PEM_32BIT,
864 if (status != PTHDB_SUCCESS)
904 status = pthdb_session_pthreaded (
PD_USER, PTHDB_FLAG_REGS,
906 if ((status != PTHDB_SUCCESS
907 && status != PTHDB_NOT_PTHREADED) || !stub_name)
973 beneath->
to_detach (beneath, args, from_tty);
992 beneath->
to_resume (beneath, ptid, step, sig);
999 error (
_(
"aix-thread resume: unknown pthread %ld"),
1003 if (tid[0] == PTHDB_INVALID_TID)
1004 error (
_(
"aix-thread resume: no tid for pthread %ld"),
1031 ptid = beneath->
to_wait (beneath, ptid, status, options);
1039 && status->
value.
sig == GDB_SIGNAL_TRAP)
1062 (
char *) (vals + regno));
1115 uint64_t iar, uint64_t msr, uint32_t cr,
1116 uint64_t lr, uint64_t ctr, uint32_t xer,
1139 uint32_t iar, uint32_t msr, uint32_t cr,
1140 uint32_t lr, uint32_t ctr, uint32_t xer,
1171 pthdb_context_t ctx;
1175 "fetch_regs_user_thread %lx\n", (
long) pdtid);
1176 status = pthdb_pthread_context (
pd_session, pdtid, &ctx);
1177 if (status != PTHDB_SUCCESS)
1178 error (
_(
"aix-thread: fetch_registers: pthdb_pthread_context returned %s"),
1197 supply_sprs64 (regcache, ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr,
1198 ctx.xer, ctx.fpscr);
1200 supply_sprs32 (regcache, ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr,
1201 ctx.xer, ctx.fpscr);
1228 struct ptxsprs sprs64;
1229 struct ptsprs sprs32;
1234 "fetch_regs_kernel_thread tid=%lx regno=%d arch64=%d\n",
1235 (
long) tid, regno,
arch64);
1245 (
unsigned long) gprs64, 0, NULL))
1246 memset (gprs64, 0,
sizeof (gprs64));
1251 if (!
ptrace32 (PTT_READ_GPRS, tid, (uintptr_t) gprs32, 0, NULL))
1252 memset (gprs32, 0,
sizeof (gprs32));
1265 if (!
ptrace32 (PTT_READ_FPRS, tid, (uintptr_t) fprs, 0, NULL))
1266 memset (fprs, 0,
sizeof (fprs));
1277 (
unsigned long) &sprs64, 0, NULL))
1278 memset (&sprs64, 0,
sizeof (sprs64));
1280 sprs64.pt_cr, sprs64.pt_lr, sprs64.pt_ctr,
1281 sprs64.pt_xer, sprs64.pt_fpscr);
1287 if (!
ptrace32 (PTT_READ_SPRS, tid, (uintptr_t) &sprs32, 0, NULL))
1288 memset (&sprs32, 0,
sizeof (sprs32));
1289 supply_sprs32 (regcache, sprs32.pt_iar, sprs32.pt_msr, sprs32.pt_cr,
1290 sprs32.pt_lr, sprs32.pt_ctr, sprs32.pt_xer,
1295 (
char *) &sprs32.pt_mq);
1318 if (tid == PTHDB_INVALID_TID)
1378 uint64_t *iar, uint64_t *msr, uint32_t *cr,
1379 uint64_t *lr, uint64_t *ctr, uint32_t *xer,
1414 uint32_t *iar, uint32_t *msr, uint32_t *cr,
1415 uint32_t *lr, uint32_t *ctr, uint32_t *xer,
1459 pthdb_context_t ctx;
1466 "store_regs_user_thread %lx\n", (
long) pdtid);
1470 status = pthdb_pthread_context (
pd_session, pdtid, &ctx);
1471 if (status != PTHDB_SUCCESS)
1472 error (
_(
"aix-thread: store_registers: pthdb_pthread_context returned %s"),
1502 fill_sprs64 (regcache, &ctx.iar, &ctx.msr, &ctx.cr, &ctx.lr, &ctx.ctr,
1503 &ctx.xer, &ctx.fpscr);
1509 uint32_t tmp_iar, tmp_msr, tmp_cr, tmp_lr, tmp_ctr, tmp_xer,
1512 fill_sprs32 (regcache, &tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr,
1513 &tmp_xer, &tmp_fpscr);
1531 ctx.fpscr = tmp_fpscr;
1534 status = pthdb_pthread_setcontext (
pd_session, pdtid, &ctx);
1535 if (status != PTHDB_SUCCESS)
1536 error (
_(
"aix-thread: store_registers: "
1537 "pthdb_pthread_setcontext returned %s"),
1558 struct ptxsprs sprs64;
1559 struct ptsprs sprs32;
1564 "store_regs_kernel_thread tid=%lx regno=%d\n",
1575 ptrace64aix (PTT_READ_GPRS, tid, (
unsigned long) gprs64, 0, NULL);
1577 ptrace64aix (PTT_WRITE_GPRS, tid, (
unsigned long) gprs64, 0, NULL);
1582 ptrace32 (PTT_READ_GPRS, tid, (uintptr_t) gprs32, 0, NULL);
1584 ptrace32 (PTT_WRITE_GPRS, tid, (uintptr_t) gprs32, 0, NULL);
1596 ptrace32 (PTT_READ_FPRS, tid, (uintptr_t) fprs, 0, NULL);
1598 ptrace32 (PTT_WRITE_FPRS, tid, (uintptr_t) fprs, 0, NULL);
1609 (
unsigned long) &sprs64, 0, NULL);
1610 fill_sprs64 (regcache, &sprs64.pt_iar, &sprs64.pt_msr,
1611 &sprs64.pt_cr, &sprs64.pt_lr, &sprs64.pt_ctr,
1612 &sprs64.pt_xer, &sprs64.pt_fpscr);
1614 (
unsigned long) &sprs64, 0, NULL);
1624 uint32_t tmp_iar, tmp_msr, tmp_cr, tmp_lr, tmp_ctr, tmp_xer,
1630 ptrace32 (PTT_READ_SPRS, tid, (uintptr_t) &sprs32, 0, NULL);
1632 fill_sprs32 (regcache, &tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr,
1633 &tmp_ctr, &tmp_xer, &tmp_fpscr);
1635 sprs32.pt_iar = tmp_iar;
1636 sprs32.pt_msr = tmp_msr;
1637 sprs32.pt_cr = tmp_cr;
1638 sprs32.pt_lr = tmp_lr;
1639 sprs32.pt_ctr = tmp_ctr;
1640 sprs32.pt_xer = tmp_xer;
1641 sprs32.pt_fpscr = tmp_fpscr;
1649 ptrace32 (PTT_WRITE_SPRS, tid, (uintptr_t) &sprs32, 0, NULL);
1672 if (tid == PTHDB_INVALID_TID)
1683 const char *annex,
gdb_byte *readbuf,
1693 writebuf, offset, len, xfered_len);
1731 static char *ret = NULL;
1754 pthdb_pthread_t pdtid;
1756 pthdb_state_t state;
1757 pthdb_suspendstate_t suspendstate;
1758 pthdb_detachstate_t detachstate;
1760 static char *ret = NULL;
1770 if (tid != PTHDB_INVALID_TID)
1774 status = pthdb_pthread_state (
pd_session, pdtid, &state);
1775 if (status != PTHDB_SUCCESS)
1779 status = pthdb_pthread_suspendstate (
pd_session, pdtid,
1781 if (status == PTHDB_SUCCESS && suspendstate == PSS_SUSPENDED)
1785 status = pthdb_pthread_detachstate (
pd_session, pdtid,
1787 if (status == PTHDB_SUCCESS && detachstate == PDS_DETACHED)
1791 pthdb_pthread_cancelpend (
pd_session, pdtid, &cancelpend);
1792 if (status == PTHDB_SUCCESS && cancelpend)
1855 _(
"Set debugging of AIX thread module."),
1856 _(
"Show debugging of AIX thread module."),
1857 _(
"Enables debugging output (used to debug GDB)."),
static void fill_fprs(const struct regcache *regcache, double *vals)
struct gdbarch * target_gdbarch(void)
char * hex_string(LONGEST num)
struct private_thread_info * priv
static void pd_disable(void)
struct thread_info * add_thread(ptid_t ptid)
struct thread_info * find_thread_ptid(ptid_t ptid)
static int ptid_cmp(ptid_t ptid1, ptid_t ptid2)
int getthrds(pid_t, struct thrdsinfo64 *, int, tid_t *, int)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
struct regcache * get_thread_regcache(ptid_t ptid)
void delete_thread(ptid_t)
static void aix_thread_detach(struct target_ops *ops, const char *args, int from_tty)
static pthdb_callbacks_t pd_callbacks
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
char *(* to_pid_to_str)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_pid_to_str)
char * ui_file_xstrdup(struct ui_file *file, long *length)
static char * pd_status2str(int status)
void push_target(struct target_ops *t)
void ui_file_delete(struct ui_file *file)
char *(* to_extra_thread_info)(struct target_ops *, struct thread_info *) TARGET_DEFAULT_RETURN(NULL)
int unpush_target(struct target_ops *t)
static CORE_ADDR pd_brk_addr
static int pdc_read_data(pthdb_user_t, void *, pthdb_addr_t, size_t)
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_fetch_registers(struct target_ops *ops, struct regcache *regcache, int regno)
void _initialize_aix_thread(void)
static int giter_accum(struct thread_info *thread, void *bufp)
static void store_regs_kernel_thread(const struct regcache *regcache, int regno, pthdb_tid_t tid)
static int pdc_alloc(pthdb_user_t, size_t, void **)
struct breakpoint * create_thread_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
static void pd_enable(void)
ptid_t(* to_wait)(struct target_ops *, ptid_t, struct target_waitstatus *, int TARGET_DEBUG_PRINTER(target_debug_print_options)) TARGET_DEFAULT_NORETURN(noprocess())
static void supply_fprs(struct regcache *regcache, double *vals)
static int giter_count(struct thread_info *thread, void *countp)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
ptid_t ptid_build(int pid, long lwp, long tid)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
struct observer * observer_attach_inferior_created(observer_inferior_created_ftype *f)
int in_thread_list(ptid_t ptid)
struct thread_info * iterate_over_threads(thread_callback_func, void *)
static int pdc_write_regs(pthdb_user_t user, pthdb_tid_t tid, unsigned long long flags, pthdb_context_t *context)
static int iter_tid(struct thread_info *thread, void *tidp)
struct cleanup * save_inferior_ptid(void)
CORE_ADDR gdbarch_decr_pc_after_break(struct gdbarch *gdbarch)
static int pdc_write_data(pthdb_user_t, void *, pthdb_addr_t, size_t)
static void pid_to_prc(ptid_t *ptidp)
static void store_regs_user_thread(const struct regcache *regcache, pthdb_pthread_t pdtid)
void complete_target_initialization(struct target_ops *t)
static pthdb_session_t pd_session
static char * state2str(pthdb_state_t state)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
void(* to_resume)(struct target_ops *, ptid_t, int TARGET_DEBUG_PRINTER(target_debug_print_step), enum gdb_signal) TARGET_DEFAULT_NORETURN(noprocess())
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 supply_gprs64(struct regcache *regcache, uint64_t *vals)
ptid_t pid_to_ptid(int pid)
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)
union target_waitstatus::@161 value
static int pcmp(const void *p1v, const void *p2v)
int gdb_signal_to_host(enum gdb_signal)
static pthdb_tid_t get_signaled_thread(void)
static void sync_threadlists(void)
static int pdc_symbol_addrs(pthdb_user_t, pthdb_symbol_t *, int)
static void new_objfile(struct objfile *objfile)
static void aix_thread_mourn_inferior(struct target_ops *ops)
enum target_xfer_status(* to_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) TARGET_DEFAULT_RETURN(TARGET_XFER_E_IO)
struct target_ops * find_target_beneath(struct target_ops *t)
char * xstrprintf(const char *format,...)
static ptid_t aix_thread_wait(struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options)
struct cmd_list_element * setdebuglist
void(* to_detach)(struct target_ops *ops, const char *, int) TARGET_DEFAULT_IGNORE()
struct ui_file * gdb_stdlog
struct ui_file * mem_fileopen(void)
static int pdc_realloc(pthdb_user_t, void *, size_t, void **)
static int aix_thread_thread_alive(struct target_ops *ops, ptid_t ptid)
static ptid_t aix_thread_get_ada_task_ptid(struct target_ops *self, long lwp, long thread)
int ptid_get_pid(ptid_t ptid)
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)
PTR xrealloc(PTR ptr, size_t size)
static void fill_gprs64(const struct regcache *regcache, uint64_t *vals)
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
long ptid_get_tid(ptid_t ptid)
void(* to_mourn_inferior)(struct target_ops *) TARGET_DEFAULT_FUNC(default_mourn_inferior)
enum register_status regcache_register_status(const struct regcache *regcache, int regnum)
enum target_waitkind kind
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
struct minimal_symbol * minsym
char * safe_strerror(int)
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)
void ui_file_write(struct ui_file *file, const char *buf, long length_buf)
static void init_aix_thread_ops(void)
static int gcmp(const void *t1v, const void *t2v)
static int ptrace32(int req, int id, addr_ptr addr, int data, int *buf)
static void fill_gprs32(const struct regcache *regcache, uint32_t *vals)
static void supply_reg32(struct regcache *regcache, int regno, uint32_t val)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
const char * to_shortname
unsigned long long ULONGEST
static int ptrace64aix(int req, int id, long long addr, int data, int *buf)
int register_size(struct gdbarch *gdbarch, int regnum)
struct observer * observer_attach_new_objfile(observer_new_objfile_ftype *f)
long ptid_get_lwp(ptid_t ptid)
static void aix_thread_inferior_created(struct target_ops *ops, int from_tty)
static struct target_ops aix_thread_ops
static int pdc_read_regs(pthdb_user_t user, pthdb_tid_t tid, unsigned long long flags, pthdb_context_t *context)
static void aix_thread_resume(struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal sig)
void regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
struct cmd_list_element * showdebuglist
int gdbarch_pc_regnum(struct gdbarch *gdbarch)
int(* to_thread_alive)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(0)
static void fetch_regs_user_thread(struct regcache *regcache, pthdb_pthread_t pdtid)
static void pd_deactivate(void)
static char * aix_thread_pid_to_str(struct target_ops *ops, ptid_t ptid)
static void aix_thread_store_registers(struct target_ops *ops, struct regcache *regcache, int regno)
static ptid_t pd_activate(int set_infpid)
static int ptrace_check(int req, int id, int ret)
static int special_register_p(struct gdbarch *gdbarch, int regno)
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
int ppc_floating_point_unit_p(struct gdbarch *gdbarch)
ptid_t(* to_get_ada_task_ptid)(struct target_ops *, long lwp, long thread) TARGET_DEFAULT_FUNC(default_get_ada_task_ptid)
void error(const char *fmt,...)
static ptid_t pd_update(int set_infpid)
struct target_ops * beneath
static int debug_aix_thread
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static int pdc_dealloc(pthdb_user_t, void *)
static void fetch_regs_kernel_thread(struct regcache *regcache, int regno, pthdb_tid_t tid)
static char * aix_thread_extra_thread_info(struct target_ops *self, struct thread_info *thread)
const ULONGEST const LONGEST len