aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppcnbsd-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ppcnbsd-tdep.c')
-rw-r--r--gdb/ppcnbsd-tdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 0765292..a00d24a 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -57,8 +57,9 @@ ppcnbsd_supply_reg (char *regs, int regno)
for (i = 0; i <= 31; i++)
{
- if (regno == i || regno == -1)
- supply_register (i, regs + REG_FIXREG_OFFSET (i));
+ if (regno == tdep->ppc_gp0_regnum + i || regno == -1)
+ supply_register (tdep->ppc_gp0_regnum + i,
+ regs + REG_FIXREG_OFFSET (i));
}
if (regno == tdep->ppc_lr_regnum || regno == -1)
@@ -85,8 +86,9 @@ ppcnbsd_fill_reg (char *regs, int regno)
for (i = 0; i <= 31; i++)
{
- if (regno == i || regno == -1)
- regcache_collect (i, regs + REG_FIXREG_OFFSET (i));
+ if (regno == tdep->ppc_gp0_regnum + i || regno == -1)
+ regcache_collect (tdep->ppc_gp0_regnum + i,
+ regs + REG_FIXREG_OFFSET (i));
}
if (regno == tdep->ppc_lr_regnum || regno == -1)