From: Mark Kettenis Date: Thu, 27 Feb 2014 20:22:29 +0000 (+0100) Subject: StackGhost cookie is per-process. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=670b46b3a90a150760d110dac4d1a85a0b94fb47;p=binutils-gdb.git StackGhost cookie is per-process. gdb/ChangeLog: * sparc-nat.c (sparc_xfer_wcookie): Always use process ID. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5dadb4f263a..6a8fc0c2033 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-02-27 Mark Kettenis + + * sparc-nat.c (sparc_xfer_wcookie): Always use process ID. + 2014-02-27 Jan Kratochvil Additional PR 8882 fix. diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index 30b512484b7..77054d143a0 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