return;
/* Check application word size. */
- arch64 = register_size (current_gdbarch, 0) == 8;
+ arch64 = register_size (target_gdbarch, 0) == 8;
/* Check whether the application is pthreaded. */
stub_name = NULL;
status = pthdb_session_pthreaded (PD_USER, PTHDB_FLAG_REGS,
&pd_callbacks, &stub_name);
- if ((status != PTHDB_SUCCESS &&
- status != PTHDB_NOT_PTHREADED) || !stub_name)
+ if ((status != PTHDB_SUCCESS
+ && status != PTHDB_NOT_PTHREADED) || !stub_name)
return;
/* Set a breakpoint on the returned stub function. */
if (!(ms = lookup_minimal_symbol (stub_name, NULL, NULL)))
return;
pd_brk_addr = SYMBOL_VALUE_ADDRESS (ms);
- if (!create_thread_event_breakpoint (pd_brk_addr))
+ if (!create_thread_event_breakpoint (target_gdbarch, pd_brk_addr))
return;
/* Prepare for thread debugging. */
}
else
{
- thread = find_thread_pid (ptid);
+ thread = find_thread_ptid (ptid);
if (!thread)
error (_("aix-thread resume: unknown pthread %ld"),
TIDGET (ptid));
static ptid_t
aix_thread_wait (struct target_ops *ops,
- ptid_t ptid, struct target_waitstatus *status)
+ ptid_t ptid, struct target_waitstatus *status, int options)
{
struct cleanup *cleanup = save_inferior_ptid ();
struct target_ops *beneath = find_target_beneath (ops);
pid_to_prc (&ptid);
inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
- ptid = beneath->to_wait (beneath, ptid, status);
+ ptid = beneath->to_wait (beneath, ptid, status, options);
do_cleanups (cleanup);
if (PIDGET (ptid) == -1)
beneath->to_fetch_registers (beneath, regcache, regno);
else
{
- thread = find_thread_pid (inferior_ptid);
+ thread = find_thread_ptid (inferior_ptid);
tid = thread->private->tid;
if (tid == PTHDB_INVALID_TID)
beneath->to_store_registers (beneath, regcache, regno);
else
{
- thread = find_thread_pid (inferior_ptid);
+ thread = find_thread_ptid (inferior_ptid);
tid = thread->private->tid;
if (tid == PTHDB_INVALID_TID)
pthdb_suspendstate_t suspendstate;
pthdb_detachstate_t detachstate;
int cancelpend;
- long length;
static char *ret = NULL;
if (!PD_TID (thread->ptid))
xfree (ret); /* Free old buffer. */
- ret = ui_file_xstrdup (buf, &length);
+ ret = ui_file_xstrdup (buf, NULL);
ui_file_delete (buf);
return ret;
static void
init_aix_thread_ops (void)
{
- aix_thread_ops.to_shortname = "aix-threads";
- aix_thread_ops.to_longname = _("AIX pthread support");
- aix_thread_ops.to_doc = _("AIX pthread support");
-
- aix_thread_ops.to_attach = aix_thread_attach;
- aix_thread_ops.to_detach = aix_thread_detach;
- aix_thread_ops.to_resume = aix_thread_resume;
- aix_thread_ops.to_wait = aix_thread_wait;
- aix_thread_ops.to_fetch_registers = aix_thread_fetch_registers;
- aix_thread_ops.to_store_registers = aix_thread_store_registers;
- aix_thread_ops.to_xfer_partial = aix_thread_xfer_partial;
+ aix_thread_ops.to_shortname = "aix-threads";
+ aix_thread_ops.to_longname = _("AIX pthread support");
+ aix_thread_ops.to_doc = _("AIX pthread support");
+
+ aix_thread_ops.to_attach = aix_thread_attach;
+ aix_thread_ops.to_detach = aix_thread_detach;
+ aix_thread_ops.to_resume = aix_thread_resume;
+ aix_thread_ops.to_wait = aix_thread_wait;
+ aix_thread_ops.to_fetch_registers = aix_thread_fetch_registers;
+ aix_thread_ops.to_store_registers = aix_thread_store_registers;
+ aix_thread_ops.to_xfer_partial = aix_thread_xfer_partial;
/* No need for aix_thread_ops.to_create_inferior, because we activate thread
debugging when the inferior reaches pd_brk_addr. */
- aix_thread_ops.to_mourn_inferior = aix_thread_mourn_inferior;
- aix_thread_ops.to_thread_alive = aix_thread_thread_alive;
- aix_thread_ops.to_pid_to_str = aix_thread_pid_to_str;
- aix_thread_ops.to_extra_thread_info = aix_thread_extra_thread_info;
- aix_thread_ops.to_get_ada_task_ptid = aix_thread_get_ada_task_ptid;
- aix_thread_ops.to_stratum = thread_stratum;
- aix_thread_ops.to_magic = OPS_MAGIC;
+ aix_thread_ops.to_mourn_inferior = aix_thread_mourn_inferior;
+ aix_thread_ops.to_thread_alive = aix_thread_thread_alive;
+ aix_thread_ops.to_pid_to_str = aix_thread_pid_to_str;
+ aix_thread_ops.to_extra_thread_info = aix_thread_extra_thread_info;
+ aix_thread_ops.to_get_ada_task_ptid = aix_thread_get_ada_task_ptid;
+ aix_thread_ops.to_stratum = thread_stratum;
+ aix_thread_ops.to_magic = OPS_MAGIC;
}
/* Module startup initialization function, automagically called by