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 6B5823858035 for ; Mon, 9 Oct 2023 18:36:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B5823858035 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.baldwin.net (unknown [98.47.15.113]) by mail.baldwin.cx (Postfix) with ESMTPSA id 61B471A84E42; Mon, 9 Oct 2023 14:36:47 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Cc: Willgerodt, Felix , George, Jini Susan , Simon Marchi Subject: [RFC 09/13] fbsd-tdep: Export fbsd_make_corefile_notes Date: Mon, 9 Oct 2023 11:36:11 -0700 Message-ID: <20231009183617.24862-10-jhb@FreeBSD.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009183617.24862-1-jhb@FreeBSD.org> References: <20231009183617.24862-1-jhb@FreeBSD.org> 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]); Mon, 09 Oct 2023 14:36:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_STATUS,KHOP_HELO_FCRDNS,SPF_HELO_PASS,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This permits FreeBSD architectures to override the gdbarch make_corefile_notes method to add architecture-specific notes. --- gdb/fbsd-tdep.c | 5 ++--- gdb/fbsd-tdep.h | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index d166d785736..ef7ea7cf8c3 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -667,10 +667,9 @@ fbsd_make_note_desc (enum target_object object, uint32_t structsize) return desc; } -/* Create appropriate note sections for a corefile, returning them in - allocated memory. */ +/* See fbsd-tdep.h. */ -static gdb::unique_xmalloc_ptr +gdb::unique_xmalloc_ptr fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) { gdb::unique_xmalloc_ptr note_data; diff --git a/gdb/fbsd-tdep.h b/gdb/fbsd-tdep.h index 65541a01a01..b457925c8a3 100644 --- a/gdb/fbsd-tdep.h +++ b/gdb/fbsd-tdep.h @@ -76,4 +76,11 @@ extern CORE_ADDR fbsd_get_thread_local_address (struct gdbarch *gdbarch, extern CORE_ADDR fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc); + +/* Create appropriate note sections for a corefile, returning them in + allocated memory. */ + +extern gdb::unique_xmalloc_ptr fbsd_make_corefile_notes +(struct gdbarch *gdbarch, bfd *obfd, int *note_size); + #endif /* fbsd-tdep.h */ -- 2.41.0