2009-12-15 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / gdb / ppcobsd-nat.c
index ae0deb4202b7b5af0efb65ad7004b401e7801bae..58ea07d9773dd98fd06bcb1664bdeb691452b26c 100644 (file)
@@ -1,6 +1,7 @@
 /* Native-dependent code for OpenBSD/powerpc.
 
-   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -45,9 +46,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 +60,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)
@@ -72,7 +73,8 @@ getfpregs_supplies (int regnum)
    for all registers.  */
 
 static void
-ppcobsd_fetch_registers (struct regcache *regcache, int regnum)
+ppcobsd_fetch_registers (struct target_ops *ops,
+                        struct regcache *regcache, int regnum)
 {
   struct reg regs;
 
@@ -88,7 +90,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;
 
@@ -106,7 +109,8 @@ ppcobsd_fetch_registers (struct regcache *regcache, int regnum)
    this for all registers.  */
 
 static void
-ppcobsd_store_registers (struct regcache *regcache, int regnum)
+ppcobsd_store_registers (struct target_ops *ops,
+                        struct regcache *regcache, int regnum)
 {
   struct reg regs;
 
@@ -126,7 +130,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;
 
This page took 0.025381 seconds and 4 git commands to generate.