diff options
author | Jim Blandy <jimb@codesourcery.com> | 2003-06-06 06:59:02 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2003-06-06 06:59:02 +0000 |
commit | cae525b1c70ff19e45c2982b7dc979aef49abab4 (patch) | |
tree | a50c334ed7d30c4c5f4bb52570c14738743b30e7 | |
parent | da1eeb9584489529c638551e3d942b246abf5ea2 (diff) | |
download | gdb-cae525b1c70ff19e45c2982b7dc979aef49abab4.tar.gz |
* ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
offsets for floating-point registers in both 32- and 64-bit
interfaces.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/ppc-linux-nat.c | 6 |
2 files changed, 10 insertions, 2 deletions
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 <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. 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) |