public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Multi-thread core file support for OpenBSD
@ 2012-01-01 12:36 Mark Kettenis
  2012-01-17  0:09 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Kettenis @ 2012-01-01 12:36 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches

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);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Multi-thread core file support for OpenBSD
  2012-01-01 12:36 [PATCH] Multi-thread core file support for OpenBSD Mark Kettenis
@ 2012-01-17  0:09 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2012-01-17  0:09 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: binutils, gdb-patches

On Sun, Jan 01, 2012 at 01:36:11PM +0100, Mark Kettenis wrote:
> 	* elf.c (elfcore_grok_openbsd_note): Initialize core_lwpid.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-16 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-01 12:36 [PATCH] Multi-thread core file support for OpenBSD Mark Kettenis
2012-01-17  0:09 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).