X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fsparc-nat.c;h=e19de1bd82e92139cf4366dfb04ee80292a4d616;hb=07446469bce213ef9773e128102ef2363e0cbe79;hp=9ce15b514d986d6ed5cd4b1dd2b0274da68ed1b5;hpb=961cb7b5ccf3306779af52da20094a2bac8030c6;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index 9ce15b514d..e19de1bd82 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for SPARC. - Copyright 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of GDB. @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ #include "defs.h" #include "inferior.h" @@ -135,9 +135,8 @@ sparc32_fpregset_supplies_p (int regnum) for all registers (including the floating-point registers). */ void -fetch_inferior_registers (int regnum) +sparc_fetch_inferior_registers (struct regcache *regcache, int regnum) { - struct regcache *regcache = current_regcache; int pid; /* NOTE: cagney/2002-12-03: This code assumes that the currently @@ -187,9 +186,8 @@ fetch_inferior_registers (int regnum) } void -store_inferior_registers (int regnum) +sparc_store_inferior_registers (struct regcache *regcache, int regnum) { - struct regcache *regcache = current_regcache; int pid; /* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers @@ -264,14 +262,16 @@ sparc_xfer_wcookie (struct target_ops *ops, enum target_object object, gdb_assert (object == TARGET_OBJECT_WCOOKIE); gdb_assert (readbuf && writebuf == NULL); - if (offset >= sizeof (unsigned long)) + if (offset == sizeof (unsigned long)) + return 0; /* Signal EOF. */ + if (offset > sizeof (unsigned long)) return -1; #ifdef PT_WCOOKIE /* If PT_WCOOKIE is defined (by ), assume we're running on an OpenBSD release that uses StackGhost (3.1 or - later). As of release 3.4, OpenBSD doesn't use a randomized - cookie yet, but a future release probably will. */ + later). Since release 3.6, OpenBSD uses a fully randomized + cookie. */ { int pid; @@ -332,8 +332,8 @@ sparc_target (void) struct target_ops *t; t = inf_ptrace_target (); - t->to_fetch_registers = fetch_inferior_registers; - t->to_store_registers = store_inferior_registers; + t->to_fetch_registers = sparc_fetch_inferior_registers; + t->to_store_registers = sparc_store_inferior_registers; inf_ptrace_xfer_partial = t->to_xfer_partial; t->to_xfer_partial = sparc_xfer_partial; return t;