summaryrefslogtreecommitdiff
path: root/gdb/shnbsd-tdep.c
diff options
context:
space:
mode:
authorMarkus Deuling <deuling@de.ibm.com>2007-11-07 06:53:41 +0000
committerMarkus Deuling <deuling@de.ibm.com>2007-11-07 06:53:41 +0000
commitd833961aadaa3ecb2cb571642a95545db8e0aa9e (patch)
tree66c4d5335dcc2536a8920215bcecdcad93679644 /gdb/shnbsd-tdep.c
parent37c964dd93c8dc5a54706dcea90980196ca7c0ac (diff)
downloadgdb-d833961aadaa3ecb2cb571642a95545db8e0aa9e.tar.gz
2007-11-07 Markus Deuling <deuling@de.ibm.com>
* shnbsd-tdep.c (shnbsd_supply_gregset, shnbsd_collect_gregset): Use get_regcache_arch to get at the current architecture by regcache. * xstormy16-tdep.c (xstormy16_frame_prev_register): Use get_frame_arch to get at the current architecture by frame_info. * fbsd-nat.c (fbsd_make_corefile_notes): Use get_regcache_arch to get at the current architecture by regcache. * gnu-v3-abi.c (gnuv3_skip_trampoline): Use get_frame_arch to get at the current architecture by frame_info. (build_gdb_vtable_type): Replace current_gdbarch by gdbarch. * aix-thread.c (special_register_p): Add gdbarch as parameter. (fetch_regs_kernel_thread, store_regs_kernel_thread): Add gdbarch to caller of special_register_p.
Diffstat (limited to 'gdb/shnbsd-tdep.c')
-rw-r--r--gdb/shnbsd-tdep.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index 8fbb950700d..d0be64b4fbf 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -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)