StackGhost cookie is per-process.
authorMark Kettenis <kettenis@gnu.org>
Thu, 27 Feb 2014 20:22:29 +0000 (21:22 +0100)
committerMark Kettenis <kettenis@gnu.org>
Thu, 27 Feb 2014 20:22:29 +0000 (21:22 +0100)
gdb/ChangeLog:

        * sparc-nat.c (sparc_xfer_wcookie): Always use process ID.

gdb/ChangeLog
gdb/sparc-nat.c

index 5dadb4f..6a8fc0c 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-27  Mark Kettenis  <kettenis@gnu.org>
+
+       * sparc-nat.c (sparc_xfer_wcookie): Always use process ID.
+
 2014-02-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Additional PR 8882 fix.
index 30b5124..77054d1 100644 (file)
@@ -282,11 +282,7 @@ sparc_xfer_wcookie (struct target_ops *ops, enum target_object object,
      later).  Since release 3.6, OpenBSD uses a fully randomized
      cookie.  */
   {
-    int pid;
-
-    pid = ptid_get_lwp (inferior_ptid);
-    if (pid == 0)
-      pid = ptid_get_pid (inferior_ptid);
+    int pid = ptid_get_pid (inferior_ptid);
 
     /* Sanity check.  The proper type for a cookie is register_t, but
        we can't assume that this type exists on all systems supported