From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mLKdIYtIJGWshikAWB0awg (envelope-from ) for ; Mon, 09 Oct 2023 14:38:03 -0400 Received: by simark.ca (Postfix, from userid 112) id 86BEF1E0D2; Mon, 9 Oct 2023 14:38:03 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 765221E0BB for ; Mon, 9 Oct 2023 14:38:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8174A3875DD7 for ; Mon, 9 Oct 2023 18:37:57 +0000 (GMT) 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@sourceware.org, Felix , George@sourceware.org, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org 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