From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mNQKAVs5KWcr0iUAWB0awg (envelope-from ) for ; Mon, 04 Nov 2024 16:15:07 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=gnnWuZhn; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F16331E5E0; Mon, 4 Nov 2024 16:15:06 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.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 4A6C21E0C0 for ; Mon, 4 Nov 2024 16:15:06 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F32E63857432 for ; Mon, 4 Nov 2024 21:15:05 +0000 (GMT) Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 80A6F385840F for ; Mon, 4 Nov 2024 21:14:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80A6F385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 80A6F385840F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754860; cv=none; b=abnTSeSqGxIBkm38AfTfw+t7MrnHsJq/oS07ApbqlSdSFhl5PN+d/ZZX49M2w8NT2LCMvuzUOQHmy1Ovx8/iaZ9Ms+3YKfnbasFFXva9mludJ1mgBiRtvrZoIZ83DKkQ5b9BzY+eZnWartPT3fVR7vWbwehrHrESVdcFfBcLMbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754860; c=relaxed/simple; bh=ehb6GZ2g7Q23Zi6FKCqb7AfChiViCejOJqTXWrmB1BQ=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=RELeOZIP1Ovb08Ow3E3EY/5n/uHEpvhnMDMudkMqv41sOmJqo9TqfVWX4QbzVsmOZTqb7QKjZ5o1Q8gRzbjCNuMNEbW2ho/z3XkoNn/ccCSpmnoPRxUD0YT78sGNuLlB12Al3PTRuw4kHKaHgQZaYU9J4jk9Sc9yVNctTTFt8jI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6009a.ext.cloudfilter.net ([10.0.30.184]) by cmsmtp with ESMTPS id 7zjMtVerCVpzp84OttSxqy; Mon, 04 Nov 2024 21:14:15 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 84OstxClcCB7M84OttR2kd; Mon, 04 Nov 2024 21:14:15 +0000 X-Authority-Analysis: v=2.4 cv=Y97+sAeN c=1 sm=1 tr=0 ts=67293927 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=ItBw4LHWJt0A:10 a=pGLkceISAAAA:8 a=lgeOkvlQ6qVwINK1TT0A:9 a=QEXdDO2ut3YA:10 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iIMLyMZxk5ZObD8WdP+M5XckRY9lsP1mqMLKoKeaGTU=; b=gnnWuZhnWZvt74MqLVrFxaeLXY kRDMRRu5FeNZhGVo6t+pe36YgOHW+I2SbYU4ojnZRLfxckhyErBvXqwWdkx6vlwnsezCLmLtthpjN Z+1UmfvGJL+059K47C+yrY0CR; Received: from 97-122-113-155.hlrn.qwest.net ([97.122.113.155]:36924 helo=prentzel.local) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1t84Os-003uOz-1W; Mon, 04 Nov 2024 14:14:14 -0700 From: Tom Tromey Date: Mon, 04 Nov 2024 14:14:13 -0700 Subject: [PATCH 3/6] Remove solib_symbols_extension gdbarch hook MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241104-check-unused-gdbarch-v1-3-7082f2121077@tromey.com> References: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> In-Reply-To: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey , Alan Modra X-Mailer: b4 0.14.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.113.155 X-Source-L: No X-Exim-ID: 1t84Os-003uOz-1W X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-113-155.hlrn.qwest.net (prentzel.local) [97.122.113.155]:36924 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfAuBXcynWTed0gux08ZM67ht/EU7iyy5M149ObHD0GEEmjKIwUwUwhf6uuBRxWumTyHxOhHi8sihJdCWNED0230ci7LoecIiFCk3lGeuwMQxF5IlIw4q IP7moBs0vvN2nmEns4h2+8uRZ2WWh38H26bE0XsB6wl+QQtMRhwhxoaJIwi1dvgTNC6UR/V4Osja2cj0GDg0wfDxkZonYElDlKI= 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 The solib_symbols_extension gdbarch hook has been obsolete since: commit 18b8df43bd11ed314153dff2ef04a4b991f00a7c Author: Alan Modra Date: Wed Feb 10 12:38:47 2021 +1030 gdb: Remove arm-symbianelf support This patch removes it. --- gdb/gdbarch-gen.c | 22 ---------------------- gdb/gdbarch-gen.h | 10 ---------- gdb/gdbarch_components.py | 15 --------------- gdb/solib.c | 27 --------------------------- 4 files changed, 74 deletions(-) diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c index e50bb1e9a819fe8e2a0219314fe939eb307e4424..3d3261f636aa8da6cdd3412d76a469eb6059aafd 100644 --- a/gdb/gdbarch-gen.c +++ b/gdb/gdbarch-gen.c @@ -232,7 +232,6 @@ struct gdbarch gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers = default_guess_tracepoint_registers; gdbarch_auto_charset_ftype *auto_charset = default_auto_charset; gdbarch_auto_wide_charset_ftype *auto_wide_charset = default_auto_wide_charset; - const char * solib_symbols_extension = 0; int has_dos_based_file_system = 0; gdbarch_gen_return_address_ftype *gen_return_address = default_gen_return_address; gdbarch_info_proc_ftype *info_proc = nullptr; @@ -501,7 +500,6 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of guess_tracepoint_registers, invalid_p == 0. */ /* Skip verify of auto_charset, invalid_p == 0. */ /* Skip verify of auto_wide_charset, invalid_p == 0. */ - /* Skip verify of solib_symbols_extension, invalid_p == 0. */ /* Skip verify of has_dos_based_file_system, invalid_p == 0. */ /* Skip verify of gen_return_address, invalid_p == 0. */ /* Skip verify of info_proc, has predicate. */ @@ -1281,9 +1279,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: auto_wide_charset = <%s>\n", host_address_to_string (gdbarch->auto_wide_charset)); - gdb_printf (file, - "gdbarch_dump: solib_symbols_extension = %s\n", - pstring (gdbarch->solib_symbols_extension)); gdb_printf (file, "gdbarch_dump: has_dos_based_file_system = %s\n", plongest (gdbarch->has_dos_based_file_system)); @@ -4940,23 +4935,6 @@ set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, gdbarch->auto_wide_charset = auto_wide_charset; } -const char * -gdbarch_solib_symbols_extension (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - /* Skip verify of solib_symbols_extension, invalid_p == 0. */ - if (gdbarch_debug >= 2) - gdb_printf (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); - return gdbarch->solib_symbols_extension; -} - -void -set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, - const char * solib_symbols_extension) -{ - gdbarch->solib_symbols_extension = solib_symbols_extension; -} - int gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch) { diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 582c682de21412b6ead55280fc936c2ce37ee4b7..0a5a168f21070b5f3baefee217eb6838791a71bb 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -1541,16 +1541,6 @@ typedef const char * (gdbarch_auto_wide_charset_ftype) (); extern const char * gdbarch_auto_wide_charset (struct gdbarch *gdbarch); extern void set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, gdbarch_auto_wide_charset_ftype *auto_wide_charset); -/* If non-empty, this is a file extension that will be opened in place - of the file extension reported by the shared library list. - - This is most useful for toolchains that use a post-linker tool, - where the names of the files run on the target differ in extension - compared to the names of the files GDB should load for debug info. */ - -extern const char * gdbarch_solib_symbols_extension (struct gdbarch *gdbarch); -extern void set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, const char * solib_symbols_extension); - /* If true, the target OS has DOS-based file system semantics. That is, absolute paths include a drive name, and the backslash is considered a directory separator. */ diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index 1c7a0aea35e40fe4b05349ee7815ba92a82bda7a..262d448b6c7130728f21afd4b55c9412553a32fb 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -2443,21 +2443,6 @@ Return the "auto" target wide charset. invalid=False, ) -Value( - comment=""" -If non-empty, this is a file extension that will be opened in place -of the file extension reported by the shared library list. - -This is most useful for toolchains that use a post-linker tool, -where the names of the files run on the target differ in extension -compared to the names of the files GDB should load for debug info. -""", - type="const char *", - name="solib_symbols_extension", - invalid=False, - printer="pstring (gdbarch->solib_symbols_extension)", -) - Value( comment=""" If true, the target OS has DOS-based file system semantics. That diff --git a/gdb/solib.c b/gdb/solib.c index 5c926def715080f3ab54172afcabc3361f15ceb0..91404f6c69c64bde645e64252429a9b840c9bec6 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -377,33 +377,6 @@ exec_file_find (const char *in_pathname, int *fd) gdb::unique_xmalloc_ptr solib_find (const char *in_pathname, int *fd) { - const char *solib_symbols_extension - = gdbarch_solib_symbols_extension (current_inferior ()->arch ()); - - /* If solib_symbols_extension is set, replace the file's - extension. */ - if (solib_symbols_extension != NULL) - { - const char *p = in_pathname + strlen (in_pathname); - - while (p > in_pathname && *p != '.') - p--; - - if (*p == '.') - { - char *new_pathname; - - new_pathname - = (char *) alloca (p - in_pathname + 1 - + strlen (solib_symbols_extension) + 1); - memcpy (new_pathname, in_pathname, p - in_pathname + 1); - strcpy (new_pathname + (p - in_pathname) + 1, - solib_symbols_extension); - - in_pathname = new_pathname; - } - } - return solib_find_1 (in_pathname, fd, true); } -- 2.46.1