X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fshnbsd-tdep.c;h=0519dce5b4e5f7205bd31109e1f89a96d7d77bfb;hb=9b254dd1ce46c19dde1dde5b8d1e22e862dfacce;hp=8fbb950700d286c64c518476cf7d61f4f8e0bcd3;hpb=a9762ec78a53fbe9209fe1654db42df0cd328d50;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c index 8fbb950700..0519dce5b4 100644 --- a/gdb/shnbsd-tdep.c +++ b/gdb/shnbsd-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for NetBSD/sh. - Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Wasabi Systems, Inc. @@ -67,14 +67,14 @@ shnbsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); const gdb_byte *regs = gregs; int i; gdb_assert (len >= SHNBSD_SIZEOF_GREGS); - if (regnum == gdbarch_pc_regnum (current_gdbarch) || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_pc_regnum (current_gdbarch), + if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) + regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), regs + (0 * 4)); if (regnum == SR_REGNUM || regnum == -1) @@ -106,13 +106,14 @@ shnbsd_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); gdb_byte *regs = gregs; int i; gdb_assert (len >= SHNBSD_SIZEOF_GREGS); - if (regnum == gdbarch_pc_regnum (current_gdbarch) || regnum == -1) - regcache_raw_collect (regcache, gdbarch_pc_regnum (current_gdbarch), + if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) + regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), regs + (0 * 4)); if (regnum == SR_REGNUM || regnum == -1)