From f8028488ab18db040894f2e616282d8bbb4aed1f Mon Sep 17 00:00:00 2001 From: Markus Deuling Date: Wed, 16 Jan 2008 04:52:52 +0000 Subject: * amd64-nat.h (amd64_native_gregset_supplies_p): Add gdbarch as parameter. * amd64-nat.c (amd64_native_gregset_supplies_p): Likewise. (amd64_native_gregset_reg_offset): Add gdbarch as parameter. Replace current_gdbarch by gdbarch. Update caller. * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers) (amd64_linux_store_inferior_registers): Use get_regcache_arch to get at the current architecture. Update calls of amd64_native_gregset_supplies_p. * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers) (amd64bsd_store_inferior_registers): Likewise. --- gdb/amd64bsd-nat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gdb/amd64bsd-nat.c') diff --git a/gdb/amd64bsd-nat.c b/gdb/amd64bsd-nat.c index e806e29..7eb2b4d 100644 --- a/gdb/amd64bsd-nat.c +++ b/gdb/amd64bsd-nat.c @@ -41,7 +41,9 @@ static void amd64bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) { - if (regnum == -1 || amd64_native_gregset_supplies_p (regnum)) + struct gdbarch *gdbarch = get_regcache_arch (regcache); + + if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum)) { struct reg regs; @@ -54,7 +56,7 @@ amd64bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) return; } - if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum)) + if (regnum == -1 || !amd64_native_gregset_supplies_p (gdbarch, regnum)) { struct fpreg fpregs; @@ -72,7 +74,9 @@ amd64bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) static void amd64bsd_store_inferior_registers (struct regcache *regcache, int regnum) { - if (regnum == -1 || amd64_native_gregset_supplies_p (regnum)) + struct gdbarch *gdbarch = get_regcache_arch (regcache); + + if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum)) { struct reg regs; @@ -90,7 +94,7 @@ amd64bsd_store_inferior_registers (struct regcache *regcache, int regnum) return; } - if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum)) + if (regnum == -1 || !amd64_native_gregset_supplies_p (gdbarch, regnum)) { struct fpreg fpregs; -- cgit v1.1