summaryrefslogtreecommitdiff
path: root/gdb/ppcnbsd-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-13 19:27:07 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-13 19:27:07 +0000
commit15c4a634ef5512dba9efd82f706a91d5dc84ad09 (patch)
tree362a36fde32855b4d3bc16bffb88102eca19e37a /gdb/ppcnbsd-tdep.c
parent531f6ffb6a0f873ec33790b8424b35e4de7dcd3f (diff)
downloadgdb-15c4a634ef5512dba9efd82f706a91d5dc84ad09.tar.gz
* 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.
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 07652924ee7..a00d24abe0d 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)