Refactor DIE reading.
[deliverable/binutils-gdb.git] / gdb / aix-thread.c
index c5db262e1f67b3c0d69e230adb0c25d13ab8aad0..534f7318ce74fa2768fea023079dea83f0ef8c05 100644 (file)
@@ -1,7 +1,7 @@
 /* Low level interface for debugging AIX 4.3+ pthreads.
 
-   Copyright (C) 1999, 2000, 2002, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002, 2007-2012 Free Software Foundation,
+   Inc.
    Written by Nick Duffek <nsd@redhat.com>.
 
    This file is part of GDB.
@@ -1075,9 +1075,11 @@ supply_fprs (struct regcache *regcache, double *vals)
      floating-point registers.  */
   gdb_assert (ppc_floating_point_unit_p (gdbarch));
 
-  for (regno = 0; regno < ppc_num_fprs; regno++)
-    regcache_raw_supply (regcache, regno + tdep->ppc_fp0_regnum,
-                        (char *) (vals + regno));
+  for (regno = tdep->ppc_fp0_regnum;
+       regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
+       regno++)
+    regcache_raw_supply (regcache, regno,
+                        (char *) (vals + regno - tdep->ppc_fp0_regnum));
 }
 
 /* Predicate to test whether given register number is a "special" register.  */
@@ -1356,7 +1358,8 @@ fill_fprs (const struct regcache *regcache, double *vals)
        regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
        regno++)
     if (REG_VALID == regcache_register_status (regcache, regno))
-      regcache_raw_collect (regcache, regno, vals + regno);
+      regcache_raw_collect (regcache, regno,
+                           vals + regno - tdep->ppc_fp0_regnum);
 }
 
 /* Store the special registers into the specified 64-bit and 32-bit
@@ -1829,6 +1832,8 @@ init_aix_thread_ops (void)
 /* Module startup initialization function, automagically called by
    init.c.  */
 
+void _initialize_aix_thread (void);
+
 void
 _initialize_aix_thread (void)
 {
This page took 0.023721 seconds and 4 git commands to generate.