* ppc-linux-nat.c (ppc_register_u_addr): Don't assume that r0 is
authorJim Blandy <jimb@codesourcery.com>
Thu, 22 Apr 2004 08:37:06 +0000 (08:37 +0000)
committerJim Blandy <jimb@codesourcery.com>
Thu, 22 Apr 2004 08:37:06 +0000 (08:37 +0000)
register number zero.

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

index 99cbd945d20731d2ca1bb70dca1aa7fb009b3a69..1cf3e61abc2d0f5ab41d686781a8d501875e5461 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-22  Jim Blandy  <jimb@redhat.com>
+
+       * ppc-linux-nat.c (ppc_register_u_addr): Don't assume that r0 is
+       register number zero.
+
 2004-04-21  Andrew Cagney  <cagney@redhat.com>
 
        * annotate.h (deprecated_annotate_starting_hook)
index a8eb7b6e0022271495e1242f62b189fc0de5e068..b869ad0b2a2056838575330b9acb85edcff70a3d 100644 (file)
@@ -133,7 +133,7 @@ ppc_register_u_addr (int regno)
 
   /* General purpose registers occupy 1 slot each in the buffer */
   if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
-    u_addr =  ((PT_R0 + regno) * wordsize);
+    u_addr = ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize);
 
   /* Floating point regs: eight bytes each in both 32- and 64-bit
      ptrace interfaces.  Thus, two slots each in 32-bit interface, one
This page took 0.03176 seconds and 4 git commands to generate.