aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppcobsd-nat.c
diff options
context:
space:
mode:
authorMarkus Deuling <deuling@de.ibm.com>2008-02-18 11:00:02 +0000
committerMarkus Deuling <deuling@de.ibm.com>2008-02-18 11:00:02 +0000
commit206988c4346c46f6dd714432959cf0c2dfb3f797 (patch)
tree6a089ac57418ad3981a61b314e13156df6b785e1 /gdb/ppcobsd-nat.c
parentf642be6b2e99b51fd66d83cc4dbd6f2e0e68c6dd (diff)
downloadfsf-binutils-gdb-206988c4346c46f6dd714432959cf0c2dfb3f797.zip
fsf-binutils-gdb-206988c4346c46f6dd714432959cf0c2dfb3f797.tar.gz
fsf-binutils-gdb-206988c4346c46f6dd714432959cf0c2dfb3f797.tar.bz2
* rs6000-nat.c (exec_one_dummy_insn, regmap): Add gdbarch as parameter
and replace current_gdbarch by gdbarch. (store_register): Update call for exec_one_dummy_insn. (fetch_register, store_register): Update call of regmap. * ppcnbsd-nat.c (getregs_supplies, getfpregs_supplies): Add gdbarch as parameter and replace current_gdbarch by gdbarch. (ppcnbsd_store_inferior_registers): Use get_regcache_arch to get at the current architecture. Update call for getregs_supplies and getfpregs_supplies. (ppcnbsd_fetch_inferior_registers): Likewise. * ppcobsd-nat.c (getfpregs_supplies): Add gdbarch as parameter and replace current_gdbarch by gdbarch. (ppcobsd_fetch_registers, ppcobsd_store_registers): Use get_regcache_arch to get at the current architecture. Update call for getfpregs_supplies.
Diffstat (limited to 'gdb/ppcobsd-nat.c')
-rw-r--r--gdb/ppcobsd-nat.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/ppcobsd-nat.c b/gdb/ppcobsd-nat.c
index ae0deb4..6203b50 100644
--- a/gdb/ppcobsd-nat.c
+++ b/gdb/ppcobsd-nat.c
@@ -45,9 +45,9 @@
/* Returns true if PT_GETFPREGS fetches this register. */
static int
-getfpregs_supplies (int regnum)
+getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
point registers. Traditionally, GDB's register set has still
@@ -59,7 +59,7 @@ getfpregs_supplies (int regnum)
It's not clear to me how best to update this code, so this assert
will alert the first person to encounter the NetBSD/E500
combination to the problem. */
- gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+ gdb_assert (ppc_floating_point_unit_p (gdbarch));
return ((regnum >= tdep->ppc_fp0_regnum
&& regnum < tdep->ppc_fp0_regnum + ppc_num_fprs)
@@ -88,7 +88,8 @@ ppcobsd_fetch_registers (struct regcache *regcache, int regnum)
#endif
#ifdef PT_GETFPREGS
- if (regnum == -1 || getfpregs_supplies (regnum))
+ if (regnum == -1
+ || getfpregs_supplies (get_regcache_arch (regcache), regnum))
{
struct fpreg fpregs;
@@ -126,7 +127,8 @@ ppcobsd_store_registers (struct regcache *regcache, int regnum)
perror_with_name (_("Couldn't write registers"));
#ifdef PT_GETFPREGS
- if (regnum == -1 || getfpregs_supplies (regnum))
+ if (regnum == -1
+ || getfpregs_supplies (get_regcache_arch (regcache), regnum))
{
struct fpreg fpregs;