diff options
author | Mark Kettenis <kettenis@gnu.org> | 2006-08-18 08:49:04 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2006-08-18 08:49:04 +0000 |
commit | 2c9771d33072dfe6abe553a2e1ba3b2883f7ca77 (patch) | |
tree | c0228868549d22cb8035618d0cc902aae3d655a8 /gdb/sparc-nat.c | |
parent | c0dd20ea15a9f5d5c8dc8c9365ca8d0765f46843 (diff) | |
download | gdb-2c9771d33072dfe6abe553a2e1ba3b2883f7ca77.zip gdb-2c9771d33072dfe6abe553a2e1ba3b2883f7ca77.tar.gz gdb-2c9771d33072dfe6abe553a2e1ba3b2883f7ca77.tar.bz2 |
* sparc-nat.c (sparc_xfer_wcookie): Signal EOF. Tweak comment.
Diffstat (limited to 'gdb/sparc-nat.c')
-rw-r--r-- | gdb/sparc-nat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index ac2a0c8..368b8ef 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -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; |