From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13502 invoked by alias); 29 Jun 2017 23:33:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 13426 invoked by uid 89); 29 Jun 2017 23:33:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL,BAYES_00,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:15 +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 6B52110AB01; Thu, 29 Jun 2017 19:33:12 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH 0/8] Add support for $_siginfo on FreeBSD Date: Thu, 29 Jun 2017 23:33:00 -0000 Message-Id: <20170629233226.20155-1-jhb@FreeBSD.org> X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00803.txt.bz2 This series adds support for $_siginfo for both live processes and process cores. siginfo_t for threads is only stored in a per-thread ELF core note on FreeBSD 12.0 and later. The existing code in corelow.c for siginfo_t assumed the Linux-specific NT_SIGINFO ELF core note, but FreeBSD stores siginfo as one member of a larger ELF core note. To accomodate this, I added a new gdbarch method that is used to fetch the signal information from a core dump. I moved the body of the existing core_get_siginfo function into an implementation of the new gdbarch method in linux-tdep.c. Tested on FreeBSD/amd64 (64-bit and 32-bit binaries), FreeBSD/i386, and Centos/x86-64 (no regressions in test suite for this last). John Baldwin (8): Implement the "get_siginfo_type" gdbarch method for FreeBSD architectures. Fetch signal information for native FreeBSD processes. Move the thread_section_name class to gdbcore.h. Add a new gdbarch method to fetch signal information from core files. Use the thread_section_name helper class in fbsd_core_thread_name. Recognize the recently-added FreeBSD core dump note for LWP info. Create psuedo sections for FreeBSD NT_PTLWPINFO core notes. Read signal information from FreeBSD core dumps. bfd/ChangeLog | 4 ++ bfd/elf.c | 4 ++ binutils/ChangeLog | 4 ++ binutils/readelf.c | 2 + gdb/ChangeLog | 43 +++++++++++ gdb/corelow.c | 82 ++++----------------- gdb/fbsd-nat.c | 155 ++++++++++++++++++++++++++++++++++++++++ gdb/fbsd-tdep.c | 197 +++++++++++++++++++++++++++++++++++++++++++++++++-- gdb/gdbarch.c | 32 +++++++++ gdb/gdbarch.h | 10 +++ gdb/gdbarch.sh | 5 ++ gdb/gdbcore.h | 45 ++++++++++++ gdb/linux-tdep.c | 21 ++++++ include/ChangeLog | 4 ++ include/elf/common.h | 1 + 15 files changed, 536 insertions(+), 73 deletions(-) -- 2.11.0