diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-04-22 08:37:06 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-04-22 08:37:06 +0000 |
commit | 26e75e5c230c6ab93386a0b6827c7a6de0864080 (patch) | |
tree | d288731606ba4483eabb6dc2dd0aaf8a6806d782 | |
parent | 76c6918d3003a2c1ca94e1b828be39651f70d890 (diff) | |
download | gdb-26e75e5c230c6ab93386a0b6827c7a6de0864080.zip gdb-26e75e5c230c6ab93386a0b6827c7a6de0864080.tar.gz gdb-26e75e5c230c6ab93386a0b6827c7a6de0864080.tar.bz2 |
* ppc-linux-nat.c (ppc_register_u_addr): Don't assume that r0 is
register number zero.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ppc-linux-nat.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 99cbd94..1cf3e61 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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) diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index a8eb7b6..b869ad0 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 |