[PATCH] Multi-thread core file support for OpenBSD
Mark Kettenis
mark.kettenis@xs4all.nl
Sun Jan 1 12:36:00 GMT 2012
Our core files are modelled after NetBSD's, so this re-uses the NetBSD
code to get the thread/LWP IDs.
ok?
2012-01-01 Mark Kettenis <kettenis@gnu.org>
* elf.c (elfcore_grok_openbsd_note): Initialize core_lwpid.
Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.546
diff -u -p -r1.546 elf.c
--- elf.c 13 Dec 2011 14:02:18 -0000 1.546
+++ elf.c 1 Jan 2012 12:32:31 -0000
@@ -8642,6 +8642,11 @@ elfcore_grok_openbsd_procinfo (bfd *abfd
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);
More information about the Gdb-patches
mailing list