From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2EzaHl45KWcr0iUAWB0awg (envelope-from ) for ; Mon, 04 Nov 2024 16:15:10 -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=L6UQ1T4T; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 77A071E5E0; Mon, 4 Nov 2024 16:15:10 -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 CAEBB1E0C0 for ; Mon, 4 Nov 2024 16:15:09 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8BEE33857704 for ; Mon, 4 Nov 2024 21:15:09 +0000 (GMT) Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id BDBB43858415 for ; Mon, 4 Nov 2024 21:14:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BDBB43858415 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 BDBB43858415 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754865; cv=none; b=Ic5re0YNJufLatIbwc1/Hs6hZult6HW8IiyRfpsWChnoRYn0ZACUnD8KEJLGUHMMwXCugOusIk23L//fEW0KWR57ytHP9AuyzR2ihpbJC37Voz5i25YC/lzjR0Mw3EqAK+Jb46RQxh5rF79HZTeOA1sHvsvZ1c3wbAWv3Img1JI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754865; c=relaxed/simple; bh=v7Xnv8D9M5vUhHp/O5EXxO8yIu38ikBXkY6EsPRp0lo=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=RTshgbrsUlzsjybaXG6i/Lm9mnwaTLgj/hjYfdfAXXDe4GpNV+UpCRQ7tZAwonXvG7kpdX43wpqcxcjqWUXlHjsQTV6c2oi3GXPH4zrBRVW6IuVDLTTxZOVI9c4oWhxE8rDvbQ+YXq4oTHU+Tc6lpwXfsdnuuBo2NrvlNnvUtzs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6001a.ext.cloudfilter.net ([10.0.30.140]) by cmsmtp with ESMTPS id 80Cotk7DbiA1984OttxcF1; Mon, 04 Nov 2024 21:14:15 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 84OstTNHc2Zy084OstsTW4; Mon, 04 Nov 2024 21:14:14 +0000 X-Authority-Analysis: v=2.4 cv=Q4EZ4J2a c=1 sm=1 tr=0 ts=67293926 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=pdvlcHuTJoGbtoTMhM0A:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ECtF69mD4eTGxs74ByPFKagbsqxaYM1LCOBRxWGk2kE=; b=L6UQ1T4T8DsKYR2kKciHkquHQE Nc9ZtZuf+fmvJkXyaQ0Gotq1HVzphCpJtpmsnbLw3z/gtixttNAnSSEjtV9i6A9OQj3j0H6CSVj7m vChQMSvnXTeoEySvbKld/agEh; 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 1t84Or-003uOz-2H; Mon, 04 Nov 2024 14:14:13 -0700 From: Tom Tromey Subject: [PATCH 0/6] Add gdbarch-checking script Date: Mon, 04 Nov 2024 14:14:10 -0700 Message-Id: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACI5KWcC/x3MwQrCMAyA4VcZOVts51D0VcRDmqZtEDtJnAhj7 271+B3+fwVjFTa4DCsov8Vkbh1hNwBVbIWdpG4Y/TiF4CdHlenulrYYJ1dSRKXq6HA+ksecT5m gp0/lLJ//9nrrjmjsomKj+pvNKkXa/oH2YoVt+wJJz3mDhgAAAA== X-Change-ID: 20241104-check-unused-gdbarch-c396c0aff7fc To: gdb-patches@sourceware.org Cc: Tom Tromey , Alan Modra , Jan Kratochvil 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: 1t84Or-003uOz-2H 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: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOMXGO44oJWOohcmIV4EVpjKoOzr12mzTGpyEBr9DaWizuVhSq9nTqKNObWhKjjRIw0uHuSDlI3Ryapg2+I562p1hJnx2iKRrJJM8jxPA1glpu56gQQU aedbcXAXcltFx6cqIT9QxhP+99Wk2dcCaJv5mG7U2h3snY7vqd1h//E1aqJ7vYIH2GSAGDP/unB4bIoCmYaBoFPBr2AEuhPXvlQ= 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 I was curious if any gdbarch methods were unused, so I wrote a script to check this. It works by scanning the source and looking for calls to gdbarch methods and for arches setting the parameter. This found a few methods that are obsolete. These are removed in the series. A few other gdbarch settings are used by gdb but not set by any existing arch. I haven't removed these since they maybe needed more discussion: stap_gdb_register_suffix stap_integer_suffixes stap_register_suffixes Maybe these could be useful. bfloat16_bit half_bit Perhaps these should just both be 16-bit types unconditionally. addressable_memory_unit_size This was added in 2015. Not sure if there's a need for it but at the same time it seems necessary if we ever want to really support arches like this. Signed-off-by: Tom Tromey --- Tom Tromey (6): Add check-gdbarch.py Use 'invalid' rather than 'predicate' in some gdbarch functions Remove solib_symbols_extension gdbarch hook Remove skip_permanent_breakpoint gdbarch hook Remove the print_vector_info gdbarch hook Remove the auto_charset gdbarch hook gdb/arch-utils.c | 12 ---- gdb/arch-utils.h | 8 --- gdb/breakpoint.c | 3 +- gdb/breakpoint.h | 3 +- gdb/charset.c | 9 +-- gdb/check-gdbarch.py | 87 +++++++++++++++++++++++ gdb/gdbarch-gen.c | 173 ++-------------------------------------------- gdb/gdbarch-gen.h | 40 ----------- gdb/gdbarch_components.py | 61 ++-------------- gdb/infcmd.c | 21 ++---- gdb/infrun.c | 7 +- gdb/solib.c | 27 -------- 12 files changed, 118 insertions(+), 333 deletions(-) --- base-commit: ae2f3fa7581fb59ebbf80f93b7ed75f853f0ba29 change-id: 20241104-check-unused-gdbarch-c396c0aff7fc Best regards, -- Tom Tromey