summaryrefslogtreecommitdiff
path: root/gdb/aix-thread.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-13 19:36:05 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-13 19:36:05 +0000
commitee29794c763b3bbc4e3cc86a7d4e1de12a81c801 (patch)
treec66f7490740f1d088668e1131104dc665539edd0 /gdb/aix-thread.c
parent9a711475ecd6cbaa07e7c2d247b36e366d0a2b6a (diff)
downloadgdb-ee29794c763b3bbc4e3cc86a7d4e1de12a81c801.tar.gz
* aix-thread.c (pdc_read_regs, supply_gprs64, supply_fprs)
(fetch_regs_user_thread, fetch_regs_kernel_thread) (store_regs_user_thread, store_regs_kernel_thread): Use ppc_num_gprs and ppc_num_fprs instead of '32' and '31'. * ppc-linux-nat.c (fill_gregset): Same. * ppc-linux-tdep.c (ppc_linux_supply_gregset) (ppc_linux_sigtramp_cache): Same. * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg) (ppcnbsd_sigtramp_cache_init): Same. * rs6000-nat.c (fetch_core_registers): Same. * rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset) (rs6000_frame_cache): Same.
Diffstat (limited to 'gdb/aix-thread.c')
-rw-r--r--gdb/aix-thread.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 0f83edf5482..d95f7e39b12 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -338,9 +338,9 @@ pdc_read_regs (pthdb_user_t user,
this is needed, I have implemented what I think it should do,
however this code is untested. */
- uint64_t gprs64[32];
- uint32_t gprs32[32];
- double fprs[32];
+ uint64_t gprs64[ppc_num_gprs];
+ uint32_t gprs32[ppc_num_gprs];
+ double fprs[ppc_num_fprs];
struct ptxsprs sprs64;
struct ptsprs sprs32;
@@ -1004,7 +1004,7 @@ supply_gprs64 (uint64_t *vals)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < 32; regno++)
+ for (regno = 0; regno < ppc_num_gprs; regno++)
supply_register (tdep->ppc_gp0_regnum + regno, (char *) (vals + regno));
}
@@ -1028,7 +1028,7 @@ supply_fprs (double *vals)
floating-point registers. */
gdb_assert (ppc_floating_point_p (current_gdbarch));
- for (regno = 0; regno < 32; regno++)
+ for (regno = 0; regno < ppc_num_fprs; regno++)
supply_register (regno + tdep->ppc_fp0_regnum, (char *) (vals + regno));
}
@@ -1116,7 +1116,7 @@ fetch_regs_user_thread (pthdb_pthread_t pdtid)
if (arch64)
supply_gprs64 (ctx.gpr);
else
- for (i = 0; i < 32; i++)
+ for (i = 0; i < ppc_num_gprs; i++)
supply_reg32 (tdep->ppc_gp0_regnum + i, ctx.gpr[i]);
/* Floating-point registers. */
@@ -1153,9 +1153,9 @@ static void
fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- uint64_t gprs64[32];
- uint32_t gprs32[32];
- double fprs[32];
+ uint64_t gprs64[ppc_num_gprs];
+ uint32_t gprs32[ppc_num_gprs];
+ double fprs[ppc_num_fprs];
struct ptxsprs sprs64;
struct ptsprs sprs32;
int i;
@@ -1181,7 +1181,7 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
if (!ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL))
memset (gprs32, 0, sizeof (gprs32));
- for (i = 0; i < 32; i++)
+ for (i = 0; i < ppc_num_gprs; i++)
supply_reg32 (tdep->ppc_gp0_regnum + i, gprs32[i]);
}
}
@@ -1391,7 +1391,7 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
/* Collect general-purpose register values from the regcache. */
- for (i = 0; i < 32; i++)
+ for (i = 0; i < ppc_num_gprs; i++)
if (register_cached (tdep->ppc_gp0_regnum + i))
{
if (arch64)
@@ -1461,9 +1461,9 @@ static void
store_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- uint64_t gprs64[32];
- uint32_t gprs32[32];
- double fprs[32];
+ uint64_t gprs64[ppc_num_gprs];
+ uint32_t gprs32[ppc_num_gprs];
+ double fprs[ppc_num_fprs];
struct ptxsprs sprs64;
struct ptsprs sprs32;
int i;