summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-04 17:58:31 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-04 17:58:31 +0000
commita6c1721bb23ad2f2a15b3001ad2d68f3f3198edc (patch)
tree98501cf68d46e8f97cfa2dd28c61b647431f5b47 /gdb/ppc-linux-nat.c
parentba7c80e5c52815e0ab1c604ce0df118698290f5b (diff)
downloadgdb-a6c1721bb23ad2f2a15b3001ad2d68f3f3198edc.tar.gz
* 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index a6ae600b8af..fc8508d64f3 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