Update copyright year in most headers.
[deliverable/binutils-gdb.git] / gdb / aix-thread.c
index 983c79ed0e3b6f4d0470209bb2b1745c48e437a5..cbdb099c709b469fdb2e97a454e94ce7d2e9d02a 100644 (file)
@@ -1,6 +1,6 @@
 /* Low level interface for debugging AIX 4.3+ pthreads.
 
-   Copyright (C) 1999, 2000, 2002, 2007, 2008, 2009
+   Copyright (C) 1999, 2000, 2002, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Written by Nick Duffek <nsd@redhat.com>.
 
@@ -887,21 +887,21 @@ pd_enable (void)
     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.  */
@@ -986,7 +986,7 @@ aix_thread_resume (struct target_ops *ops,
     }
   else
     {
-      thread = find_thread_pid (ptid);
+      thread = find_thread_ptid (ptid);
       if (!thread)
        error (_("aix-thread resume: unknown pthread %ld"),
               TIDGET (ptid));
@@ -1302,7 +1302,7 @@ aix_thread_fetch_registers (struct target_ops *ops,
     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)
@@ -1643,7 +1643,7 @@ aix_thread_store_registers (struct target_ops *ops,
     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)
@@ -1734,7 +1734,6 @@ aix_thread_extra_thread_info (struct thread_info *thread)
   pthdb_suspendstate_t suspendstate;
   pthdb_detachstate_t detachstate;
   int cancelpend;
-  long length;
   static char *ret = NULL;
 
   if (!PD_TID (thread->ptid))
@@ -1775,7 +1774,7 @@ aix_thread_extra_thread_info (struct thread_info *thread)
 
   xfree (ret);                 /* Free old buffer.  */
 
-  ret = ui_file_xstrdup (buf, &length);
+  ret = ui_file_xstrdup (buf, NULL);
   ui_file_delete (buf);
 
   return ret;
This page took 0.029574 seconds and 4 git commands to generate.