From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2607:f138:0:13::2]) by sourceware.org (Postfix) with ESMTPS id E6EDF3858D3C; Thu, 24 Mar 2022 20:56:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6EDF3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=FreeBSD.org Received: from ralph.com (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 496FE1A84C5E; Thu, 24 Mar 2022 16:56:22 -0400 (EDT) From: John Baldwin To: binutils@sourceware.org, gdb-patches@sourceware.org Subject: [PATCH 0/5] Handle FreeBSD's NT_X86_SEGBASES core dump note Date: Thu, 24 Mar 2022 13:56:11 -0700 Message-Id: <20220324205616.8517-1-jhb@FreeBSD.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Thu, 24 Mar 2022 16:56:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2022 20:56:24 -0000 This core dump note contains the value of the %fsbase and %gsbase registers (or on i386 the base address of the respective segments). This is used to resolve the address of TLS variables in core dumps. John Baldwin (5): elfcore_grok_freebsd_note: Remove checks of note->namesz. Recognize FreeBSD core dump note for x86 segment base registers. Use pseudosections for NT_FREEBSD_X86_SEGBASES core dump notes. FreeBSD/x86: Read segment base registers from NT_X86_SEGBASES. Use I386_GSBASE_REGNUM in i386fbsd_get_thread_local_address. bfd/ChangeLog | 13 +++++++++++++ bfd/elf-bfd.h | 2 ++ bfd/elf.c | 24 ++++++++++++++++-------- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 2 ++ gdb/amd64-fbsd-tdep.c | 18 ++++++++++++++++++ gdb/i386-fbsd-tdep.c | 25 ++++++++++++++++++++----- include/ChangeLog | 4 ++++ include/elf/common.h | 1 + 9 files changed, 81 insertions(+), 13 deletions(-) -- 2.34.1