summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2012-01-01 13:00:59 +0000
committerkettenis <kettenis@openbsd.org>2012-01-01 13:00:59 +0000
commit5e30010df8b00749d7fdd397ee744502b071fb0c (patch)
tree57f353a583a2ed0d2296d36278524b133e130783
parentcopyright++ (diff)
downloadwireguard-openbsd-5e30010df8b00749d7fdd397ee744502b071fb0c.tar.xz
wireguard-openbsd-5e30010df8b00749d7fdd397ee744502b071fb0c.zip
Properly recognize threads in OpenBSD core dumps.
-rw-r--r--gnu/usr.bin/binutils-2.17/bfd/elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elf.c b/gnu/usr.bin/binutils-2.17/bfd/elf.c
index 76e76644d03..de8228740b4 100644
--- a/gnu/usr.bin/binutils-2.17/bfd/elf.c
+++ b/gnu/usr.bin/binutils-2.17/bfd/elf.c
@@ -7875,6 +7875,11 @@ elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
static bfd_boolean
elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note)
{
+ int lwp;
+
+ if (elfcore_netbsd_get_lwpid (note, &lwp))
+ elf_tdata (abfd)->core_lwpid = lwp;
+
if (note->type == NT_OPENBSD_PROCINFO)
return elfcore_grok_openbsd_procinfo (abfd, note);