diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-05 11:44:24 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-05 11:44:24 +0000 |
commit | 6ba384252317623eac67489bfb810b158615fe5b (patch) | |
tree | 435b5a5f962845b90813919c57f47d2609ce759f /gdb/m68kbsd-tdep.c | |
parent | 35488783c1f8b2732b9f8c1583d3056299eb6190 (diff) | |
download | gdb-6ba384252317623eac67489bfb810b158615fe5b.zip gdb-6ba384252317623eac67489bfb810b158615fe5b.tar.gz gdb-6ba384252317623eac67489bfb810b158615fe5b.tar.bz2 |
* m68k-tdep.h (m68kbsd_fpreg_offset): Add gdbarch parameter.
* m68kbsd-tdep.c (m68kbsd_fpreg_offset): Add gdbarch paramter.
Use it instead of current_gdbarch.
(m68kbsd_supply_fpregset): Update call.
* m68kbsd-nat.c (m68kbsd_supply_fpregset): Likewise.
(m68kbsd_collect_fpregset): Likewise.
Diffstat (limited to 'gdb/m68kbsd-tdep.c')
-rw-r--r-- | gdb/m68kbsd-tdep.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c index f0478e6..a74c493 100644 --- a/gdb/m68kbsd-tdep.c +++ b/gdb/m68kbsd-tdep.c @@ -42,9 +42,9 @@ #define M68KBSD_SIZEOF_FPREGS (((8 * 3) + 3) * 4) int -m68kbsd_fpreg_offset (int regnum) +m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum) { - int fp_len = TYPE_LENGTH (gdbarch_register_type (current_gdbarch, regnum)); + int fp_len = TYPE_LENGTH (gdbarch_register_type (gdbarch, regnum)); if (regnum >= M68K_FPC_REGNUM) return 8 * fp_len + (regnum - M68K_FPC_REGNUM) * 4; @@ -61,6 +61,7 @@ m68kbsd_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); const gdb_byte *regs = fpregs; int i; @@ -69,7 +70,8 @@ m68kbsd_supply_fpregset (const struct regset *regset, for (i = M68K_FP0_REGNUM; i <= M68K_PC_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + m68kbsd_fpreg_offset (i)); + regcache_raw_supply (regcache, i, + regs + m68kbsd_fpreg_offset (gdbarch, i)); } } |