]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
authorJim Blandy <jimb@codesourcery.com>
Fri, 6 Jun 2003 06:59:02 +0000 (06:59 +0000)
committerJim Blandy <jimb@codesourcery.com>
Fri, 6 Jun 2003 06:59:02 +0000 (06:59 +0000)
offsets for floating-point registers in both 32- and 64-bit
interfaces.

gdb/ChangeLog
gdb/ppc-linux-nat.c

index 76cb931ace53df2d647c1c59ae368feef463ec1e..e6db096fcb47ba14bc289feac84b1e0c1d448016 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-06  Jim Blandy  <jimb@redhat.com>
+
+       * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
+       offsets for floating-point registers in both 32- and 64-bit
+       interfaces.
+
 2003-06-05  Jim Blandy  <jimb@redhat.com>
 
        Recognize and skip 64-bit PowerPC Linux linkage functions.
index c668c589def6852156485d00577cce742aad265a..feb2f94953acbadf5ce48b29e6d33ae38a58d267 100644 (file)
@@ -133,9 +133,11 @@ ppc_register_u_addr (int regno)
   if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
     u_addr =  ((PT_R0 + regno) * wordsize);
 
-  /* Floating point regs: 2 slots each */
+  /* Floating point regs: eight bytes in both 32- and 64-bit ptrace
+     interfaces.  Thus, two slots each in 32-bit interface, one slot
+     each in 64-bit interface.  */
   if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
-    u_addr = ((PT_FPR0 + (regno - FP0_REGNUM) * 2) * 4);
+    u_addr = (PT_FPR0 * wordsize) + ((regno - FP0_REGNUM) * 8);
 
   /* UISA special purpose registers: 1 slot each */
   if (regno == PC_REGNUM)