This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] StackGhost cookie is per-process.
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: gdb-patches at sourceware dot org
- Date: Thu, 27 Feb 2014 21:30:15 +0100 (CET)
- Subject: [PATCH] StackGhost cookie is per-process.
- Authentication-results: sourceware.org; auth=none
Committed.
gdb/ChangeLog:
* sparc-nat.c (sparc_xfer_wcookie): Always use process ID.
---
gdb/ChangeLog | 4 ++++
gdb/sparc-nat.c | 6 +-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5dadb4f..6a8fc0c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 30b5124..77054d1 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -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
--
1.8.5.3