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/ppc-linux-tdep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdb/ppc-linux-tdep.c') diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 49f4ad6..a6e7564 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -861,7 +861,9 @@ ppc_linux_supply_gregset (struct regcache *regcache, const bfd_byte *buf = gregs; for (regi = 0; regi < 32; regi++) - right_supply_register (regcache, wordsize, regi, buf + wordsize * regi); + right_supply_register (regcache, wordsize, + regcache_tdep->ppc_gp0_regnum + regi, + buf + wordsize * regi); right_supply_register (regcache, wordsize, gdbarch_pc_regnum (regcache_arch), buf + wordsize * PPC_LINUX_PT_NIP); -- cgit v1.1