diff options
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r-- | gdb/ppc-linux-nat.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) |