From 26e75e5c230c6ab93386a0b6827c7a6de0864080 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 22 Apr 2004 08:37:06 +0000 Subject: * ppc-linux-nat.c (ppc_register_u_addr): Don't assume that r0 is register number zero. --- gdb/ppc-linux-nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/ppc-linux-nat.c') diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index a8eb7b6e00..b869ad0b2a 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -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 -- cgit v1.2.1