diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-05-04 17:43:52 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-05-04 17:43:52 +0000 |
commit | b967e06fbcdd33cc9f61e62dad38dc6d879c1405 (patch) | |
tree | 81453d67630dd685243fa4c2584fa478e8e1cc1f /gdb/ppc-bdm.c | |
parent | edf61169009a4add7b95e1febbfc99bd10f03096 (diff) | |
download | gdb-b967e06fbcdd33cc9f61e62dad38dc6d879c1405.zip gdb-b967e06fbcdd33cc9f61e62dad38dc6d879c1405.tar.gz gdb-b967e06fbcdd33cc9f61e62dad38dc6d879c1405.tar.bz2 |
* config/rs6000/tm-rs6000.h (FPLAST_REGNUM): Delete #definition.
* ppc-tdep.h (ppc_num_fprs): New enum constant.
* aix-thread.c (fetch_regs_kernel_thread, fill_fprs,
store_regs_kernel_thread): Use FP0_REGNUM + ppc_num_fprs, not
FPLAST_REGNUM.
* ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
Same.
* ppc-linux-nat.c (ppc_register_u_addr): Same.
* rs6000-nat.c (regmap, fetch_inferior_registers)
(store_inferior_registers): Same.
Diffstat (limited to 'gdb/ppc-bdm.c')
-rw-r--r-- | gdb/ppc-bdm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c index 2355b2c..515cbdd 100644 --- a/gdb/ppc-bdm.c +++ b/gdb/ppc-bdm.c @@ -162,7 +162,7 @@ bdm_ppc_fetch_registers (int regno) int reglen, beginreglen, endreglen; #if 1 - for (i = 0; i < (FPLAST_REGNUM - FP0_REGNUM + 1); i++) + for (i = 0; i < ppc_num_fprs; i++) { midregs[i] = -1; } @@ -202,7 +202,8 @@ bdm_ppc_fetch_registers (int regno) /* if asking for an invalid register */ if ((first_regno == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum) || (first_regno == gdbarch_tdep (current_gdbarch)->ppc_fpscr_regnum) - || ((first_regno >= FP0_REGNUM) && (first_regno <= FPLAST_REGNUM))) + || ((first_regno >= FP0_REGNUM) + && (first_regno < FP0_REGNUM + ppc_num_fprs))) { /* printf("invalid reg request!\n"); */ supply_register (first_regno, NULL); @@ -221,7 +222,7 @@ bdm_ppc_fetch_registers (int regno) beginregs = ocd_read_bdm_registers (first_bdm_regno, FP0_REGNUM - 1, &beginreglen); endregs = (strcat (midregs, - ocd_read_bdm_registers (FPLAST_REGNUM + 1, + ocd_read_bdm_registers (FP0_REGNUM + ppc_num_fprs, last_bdm_regno - 1, &endreglen))); almostregs = (strcat (beginregs, endregs)); regs = (strcat (almostregs, mqreg)); @@ -292,7 +293,7 @@ bdm_ppc_store_registers (int regno) /* (need to avoid FP regs and MQ reg) */ if ((i != gdbarch_tdep (current_gdbarch)->ppc_mq_regnum) && (i != gdbarch_tdep (current_gdbarch)->ppc_fpscr_regnum) - && ((i < FP0_REGNUM) || (i > FPLAST_REGNUM))) + && ((i < FP0_REGNUM) || (i >= FP0_REGNUM + ppc_num_fprs))) { /* printf("write valid reg %d\n", bdm_regno); */ ocd_write_bdm_registers (bdm_regno, deprecated_registers + DEPRECATED_REGISTER_BYTE (i), 4); |