From patchwork Thu Jun 29 23:32:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 21347 Received: (qmail 14372 invoked by alias); 29 Jun 2017 23:33:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 13794 invoked by uid 89); 29 Jun 2017 23:33:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Jun 2017 23:33:22 +0000 Received: from ralph.baldwin.cx.com (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id D25D110AF12; Thu, 29 Jun 2017 19:33:16 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH 6/8] Recognize the recently-added FreeBSD core dump note for LWP info. Date: Thu, 29 Jun 2017 16:32:24 -0700 Message-Id: <20170629233226.20155-7-jhb@FreeBSD.org> In-Reply-To: <20170629233226.20155-1-jhb@FreeBSD.org> References: <20170629233226.20155-1-jhb@FreeBSD.org> X-IsSubscribed: yes This core dump note contains the same information returned by the ptrace PT_LWPINFO operation for each LWP belonging to a process. binutils/ChangeLog: * readelf.c (get_freebsd_elfcore_note_type): Handle NT_FREEBSD_PTLWPINFO. include/ChangeLog: * elf/common.h (NT_FREEBSD_PTLWPINFO): Define. --- binutils/ChangeLog | 4 ++++ binutils/readelf.c | 2 ++ include/ChangeLog | 4 ++++ include/elf/common.h | 1 + 4 files changed, 11 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 6997db969c..94d2be4554 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2017-06-28 John Baldwin + * readelf.c (get_freebsd_elfcore_note_type): Handle + NT_FREEBSD_PTLWPINFO. + 2017-06-19 Nick Clifton PR binutils/21619 diff --git a/binutils/readelf.c b/binutils/readelf.c index bb6bb79d4e..74d116b88e 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -16710,6 +16710,8 @@ get_freebsd_elfcore_note_type (unsigned e_type) return _("NT_PROCSTAT_PSSTRINGS (ps_strings data)"); case NT_FREEBSD_PROCSTAT_AUXV: return _("NT_PROCSTAT_AUXV (auxv data)"); + case NT_FREEBSD_PTLWPINFO: + return _("NT_PTLWPINFO (ptrace_lwpinfo structure)"); } return get_note_type (e_type); } diff --git a/include/ChangeLog b/include/ChangeLog index 44905d7da9..250747e282 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2017-06-28 John Baldwin + + * elf/common.h (NT_FREEBSD_PTLWPINFO): Define. + 2017-06-16 Alan Modra PR ld/20022 diff --git a/include/elf/common.h b/include/elf/common.h index 484cb48f96..b98c5eac4b 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -637,6 +637,7 @@ #define NT_FREEBSD_PROCSTAT_OSREL 14 /* Procstat osreldate data. */ #define NT_FREEBSD_PROCSTAT_PSSTRINGS 15 /* Procstat ps_strings data. */ #define NT_FREEBSD_PROCSTAT_AUXV 16 /* Procstat auxv data. */ +#define NT_FREEBSD_PTLWPINFO 17 /* Thread ptrace miscellaneous info. */ /* Note segments for core files on NetBSD systems. Note name must start with "NetBSD-CORE". */