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 | 9b1ec84dce5614aa8d81d9f26a0ad48f90405644 (patch) | |
tree | 94e1cbb7d6366c0e777721794d7f8c7e7b7af123 /gdb/m68kbsd-nat.c | |
parent | 5c620aa99757c9febf1b8c125bd5e0c89acec04a (diff) | |
download | gdb-9b1ec84dce5614aa8d81d9f26a0ad48f90405644.tar.gz |
* 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-nat.c')
-rw-r--r-- | gdb/m68kbsd-nat.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/m68kbsd-nat.c b/gdb/m68kbsd-nat.c index efa93a86066..bd3e352fb2a 100644 --- a/gdb/m68kbsd-nat.c +++ b/gdb/m68kbsd-nat.c @@ -59,12 +59,13 @@ m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs) static void m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); const char *regs = fpregs; int regnum; for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++) regcache_raw_supply (regcache, regnum, - regs + m68kbsd_fpreg_offset (regnum)); + regs + m68kbsd_fpreg_offset (gdbarch, regnum)); } /* Collect the general-purpose registers from REGCACHE and store them @@ -91,13 +92,15 @@ static void m68kbsd_collect_fpregset (struct regcache *regcache, void *fpregs, int regnum) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); char *regs = fpregs; int i; for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++) { if (regnum == -1 || regnum == i) - regcache_raw_collect (regcache, i, regs + m68kbsd_fpreg_offset (i)); + regcache_raw_collect (regcache, i, + regs + m68kbsd_fpreg_offset (gdbarch, i)); } } |