From: Jim Blandy Date: Fri, 6 Jun 2003 06:59:02 +0000 (+0000) Subject: * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e456e47329fb789738f31ffc1f6e25281f1f9f1;p=thirdparty%2Fbinutils-gdb.git * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area offsets for floating-point registers in both 32- and 64-bit interfaces. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 76cb931ace5..e6db096fcb4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-06-06 Jim Blandy + + * 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 Recognize and skip 64-bit PowerPC Linux linkage functions. diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index c668c589def..feb2f94953a 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -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)