aboutsummaryrefslogtreecommitdiff
path: root/gdb/aix-thread.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-04 17:43:52 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-04 17:43:52 +0000
commitb967e06fbcdd33cc9f61e62dad38dc6d879c1405 (patch)
tree81453d67630dd685243fa4c2584fa478e8e1cc1f /gdb/aix-thread.c
parentedf61169009a4add7b95e1febbfc99bd10f03096 (diff)
downloadgdb-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/aix-thread.c')
-rw-r--r--gdb/aix-thread.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 0ce285a..89a0755 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1175,7 +1175,9 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
/* Floating-point registers. */
- if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
+ if (regno == -1
+ || (regno >= FP0_REGNUM
+ && regno < FP0_REGNUM + ppc_num_fprs))
{
if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
memset (fprs, 0, sizeof (fprs));
@@ -1262,7 +1264,7 @@ fill_fprs (double *vals)
{
int regno;
- for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
+ for (regno = FP0_REGNUM; regno < FP0_REGNUM + ppc_num_fprs; regno++)
if (register_cached (regno))
regcache_collect (regno, vals + regno);
}
@@ -1466,7 +1468,9 @@ store_regs_kernel_thread (int regno, pthdb_tid_t tid)
/* Floating-point registers. */
- if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
+ if (regno == -1
+ || (regno >= FP0_REGNUM
+ && regno < FP0_REGNUM + ppc_num_fprs))
{
/* Pre-fetch: some regs may not be in the cache. */
ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);