RFA: use ppc_gp0_regnum when appropriate
Jim Blandy
jimb@redhat.com
Fri May 7 01:19:00 GMT 2004
2004-05-06 Jim Blandy <jimb@redhat.com>
* aix-thread.c (fetch_regs_kernel_thread, fill_gprs64,
fill_gprs32, store_regs_kernel_thread): Use tdep->ppc_gp0_regnum
to recognize gpr regnums, instead of assuming that
tdep->ppc_fp0_regnum marks the end of the general-purpose
registers.
*** gdb/aix-thread.c 2004-05-06 14:18:00.000000000 -0500
--- gdb/aix-thread.c 2004-05-06 14:25:58.000000000 -0500
*************** fetch_regs_kernel_thread (int regno, pth
*** 1157,1163 ****
(long) tid, regno, arch64);
/* General-purpose registers. */
! if (regno == -1 || regno < tdep->ppc_fp0_regnum)
{
if (arch64)
{
--- 1157,1165 ----
(long) tid, regno, arch64);
/* General-purpose registers. */
! if (regno == -1
! || (tdep->ppc_gp0_regnum <= regno
! && regno < tdep->ppc_gp0_regnum + ppc_num_gprs))
{
if (arch64)
{
*************** fill_gprs64 (uint64_t *vals)
*** 1246,1254 ****
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++)
! if (register_cached (regno))
! regcache_collect (regno, vals + regno);
}
static void
--- 1248,1256 ----
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < ppc_num_gprs; regno++)
! if (register_cached (tdep->ppc_gp0_regnum + regno))
! regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
static void
*************** fill_gprs32 (uint32_t *vals)
*** 1257,1265 ****
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++)
! if (register_cached (regno))
! regcache_collect (regno, vals + regno);
}
/* Store the floating point registers into a double array. */
--- 1259,1267 ----
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < ppc_num_gprs; regno++)
! if (register_cached (tdep->ppc_gp0_regnum + regno))
! regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
/* Store the floating point registers into a double array. */
*************** store_regs_kernel_thread (int regno, pth
*** 1456,1462 ****
(long) tid, regno);
/* General-purpose registers. */
! if (regno == -1 || regno < tdep->ppc_fp0_regnum)
{
if (arch64)
{
--- 1458,1466 ----
(long) tid, regno);
/* General-purpose registers. */
! if (regno == -1
! || (tdep->ppc_gp0_regnum <= regno
! && regno < tdep->ppc_gp0_regnum + ppc_num_fprs))
{
if (arch64)
{
More information about the Gdb-patches
mailing list