aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 5879c2c..4f2190b 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -185,7 +185,9 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
size_t offset;
int i;
- for (i = 0, offset = offsets->r0_offset; i < 32; i++, offset += 4)
+ for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
+ i < tdep->ppc_gp0_regnum + 32;
+ i++, offset += 4)
{
if (regnum == -1 || regnum == i)
ppc_supply_reg (regcache, i, gregs, offset);
@@ -259,7 +261,9 @@ ppc_collect_gregset (const struct regset *regset,
int i;
offset = offsets->r0_offset;
- for (i = 0; i < 32; i++, offset += 4)
+ for (i = tdep->ppc_gp0_regnum;
+ i < tdep->ppc_gp0_regnum + 32;
+ i++, offset += 4)
{
if (regnum == -1 || regnum == i)
ppc_collect_reg (regcache, i, gregs, offset);