* gdb.base/long_long.exp: Accept optional symbol name in <...>
[deliverable/binutils-gdb.git] / gdb / sparc-nat.c
index ac2a0c8231406e7d5db99b25339445bc27fe0799..7125fc448d532d9d404cb7764bbe9ed1952acab2 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for SPARC.
 
-   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -264,14 +264,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 <sys/ptrace.h>), 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;
 
This page took 0.026807 seconds and 4 git commands to generate.