X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fsparc-nat.c;h=34edba325ae70272e9ba759239186c93c4d83a59;hb=8464be768129e057bc92e27de51317b99717da8f;hp=abbe597af4e49900bc6e45a45922924e503c25fa;hpb=9b254dd1ce46c19dde1dde5b8d1e22e862dfacce;p=binutils-gdb.git diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index abbe597af4e..34edba325ae 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -1,6 +1,7 @@ /* Native-dependent code for SPARC. - Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. This file is part of GDB. @@ -88,13 +89,13 @@ void (*sparc_collect_gregset) (const struct sparc_gregset *, const struct regcache *, int, void *); void (*sparc_supply_fpregset) (struct regcache *, int , const void *); void (*sparc_collect_fpregset) (const struct regcache *, int , void *); -int (*sparc_gregset_supplies_p) (int); -int (*sparc_fpregset_supplies_p) (int); +int (*sparc_gregset_supplies_p) (struct gdbarch *, int); +int (*sparc_fpregset_supplies_p) (struct gdbarch *, int); /* Determine whether `gregset_t' contains register REGNUM. */ int -sparc32_gregset_supplies_p (int regnum) +sparc32_gregset_supplies_p (struct gdbarch *gdbarch, int regnum) { /* Integer registers. */ if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM) @@ -116,7 +117,7 @@ sparc32_gregset_supplies_p (int regnum) /* Determine whether `fpregset_t' contains register REGNUM. */ int -sparc32_fpregset_supplies_p (int regnum) +sparc32_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum) { /* Floating-point registers. */ if (regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM) @@ -133,8 +134,10 @@ sparc32_fpregset_supplies_p (int regnum) for all registers (including the floating-point registers). */ void -sparc_fetch_inferior_registers (struct regcache *regcache, int regnum) +sparc_fetch_inferior_registers (struct target_ops *ops, + struct regcache *regcache, int regnum) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); int pid; /* NOTE: cagney/2002-12-03: This code assumes that the currently @@ -160,7 +163,7 @@ sparc_fetch_inferior_registers (struct regcache *regcache, int regnum) return; } - if (regnum == -1 || sparc_gregset_supplies_p (regnum)) + if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum)) { gregset_t regs; @@ -172,7 +175,7 @@ sparc_fetch_inferior_registers (struct regcache *regcache, int regnum) return; } - if (regnum == -1 || sparc_fpregset_supplies_p (regnum)) + if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum)) { fpregset_t fpregs; @@ -184,8 +187,10 @@ sparc_fetch_inferior_registers (struct regcache *regcache, int regnum) } void -sparc_store_inferior_registers (struct regcache *regcache, int regnum) +sparc_store_inferior_registers (struct target_ops *ops, + struct regcache *regcache, int regnum) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); int pid; /* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers @@ -194,7 +199,7 @@ sparc_store_inferior_registers (struct regcache *regcache, int regnum) if (pid == 0) pid = PIDGET (inferior_ptid); - if (regnum == -1 || sparc_gregset_supplies_p (regnum)) + if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum)) { gregset_t regs; @@ -220,7 +225,7 @@ sparc_store_inferior_registers (struct regcache *regcache, int regnum) return; } - if (regnum == -1 || sparc_fpregset_supplies_p (regnum)) + if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum)) { fpregset_t fpregs, saved_fpregs;