From cdf2c5f516c73172ae0bfe06fed25cb8cb4ea215 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 13 May 2004 19:27:07 +0000 Subject: * aix-thread.c (supply_gprs64, fetch_regs_user_thread) (store_regs_user_thread): Use tdep->ppc_gp0_regnum, instead of assuming that the gprs are numbered starting with zero. * ppc-linux-nat.c (fill_gregset): Same. * ppc-linux-tdep.c (ppc_linux_supply_gregset): Same. * ppcnbsd-nat.c (getregs_supplies): Same. * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg): Same. * rs6000-nat.c (fetch_core_registers): Same. * rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset): Same. --- gdb/ppcnbsd-tdep.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gdb/ppcnbsd-tdep.c') 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) -- cgit v1.1