diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-05-04 17:58:31 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-05-04 17:58:31 +0000 |
commit | 8bf659e8f6f3cd9041872b77334812bc176bd2e7 (patch) | |
tree | 1f03970a815fee6d9fb5fcec1f6fb1c0ecc2ab31 /gdb/ppc-linux-nat.c | |
parent | b967e06fbcdd33cc9f61e62dad38dc6d879c1405 (diff) | |
download | gdb-8bf659e8f6f3cd9041872b77334812bc176bd2e7.zip gdb-8bf659e8f6f3cd9041872b77334812bc176bd2e7.tar.gz gdb-8bf659e8f6f3cd9041872b77334812bc176bd2e7.tar.bz2 |
* config/ppc-tdep.h (struct gdbarch_tdep): Delete
'ppc_gplast_regnum' member.
(ppc_num_gprs): New enum constant.
* ppc-linux-nat.c (ppc_register_u_addr): Use tdep->ppc_gp0_regnum
and ppc_num_gprs instead of tdep->ppc_gplast_regnum.
* rs6000-nat.c (regmap, fetch_inferior_registers,
store_inferior_registers): Same.
* rs6000-tdep.c (e500_pseudo_register_read)
(e500_pseudo_register_write): Same.
(rs6000_gdbarch_init): Don't initialize tdep->ppc_gplast_regnum.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r-- | gdb/ppc-linux-nat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index a6ae600..fc8508d 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -132,7 +132,8 @@ ppc_register_u_addr (int regno) int wordsize = sizeof (PTRACE_XFER_TYPE); /* General purpose registers occupy 1 slot each in the buffer */ - if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum ) + if (regno >= tdep->ppc_gp0_regnum + && regno < tdep->ppc_gp0_regnum + ppc_num_gprs) u_addr = ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize); /* Floating point regs: eight bytes each in both 32- and 64-bit |