From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sB86MoE5KWcr0iUAWB0awg (envelope-from ) for ; Mon, 04 Nov 2024 16:15:45 -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=eOeUyElF; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C5A7B1E5E0; Mon, 4 Nov 2024 16:15:45 -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 BBB9B1E0C0 for ; Mon, 4 Nov 2024 16:15:44 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B01F3857729 for ; Mon, 4 Nov 2024 21:15:44 +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 1F7BD3857BA5 for ; Mon, 4 Nov 2024 21:14:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F7BD3857BA5 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 1F7BD3857BA5 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=1730754866; cv=none; b=NWLjRdwRaVJkxQU0mQQw4kDjBCOyR1Y6qw93tvE3L/LmIx4FB3vf8aGmSGjXqMAM1HeeySrNt22ekQdteSrhPn/tfQt1YXM2xWqC5Hikiz2NF3HicdC5WQ6rW54+yyWBqcNpTAbk6GvkkOCtG4987o6pW3V40OcCtONagjf9XAI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754866; c=relaxed/simple; bh=8z7ra1n/5dxrP+txQlcw5P+UTc0ZY5m3GCKXqrvoY5g=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=NFKhNqXFqOvt9TLGh9JVgLe8MMuLUYku2LoK+bG7FmKEMDV86cqC09Qgt4mXCTxBLVGxutNdfd4LPhvmS+NegdJg8bDbxYnH1CUoJAuoRpLq85E5yJYMKhdtrv4spXG+5wu8I1PCcU9yY1JY22in+1NAPDZq0cmRh6Ww2VyV3tM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTPS id 7zimtVeYkVpzp84OutSxr7; Mon, 04 Nov 2024 21:14:16 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 84Ottxoswdurn84OttjhZt; Mon, 04 Nov 2024 21:14:15 +0000 X-Authority-Analysis: v=2.4 cv=aNH2q69m c=1 sm=1 tr=0 ts=67293927 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=ItBw4LHWJt0A:10 a=pYgRNLhMY9cdfaeyWXUA: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=a6J7W8F2ip4XLJS9KvIuDcT6j0weGJvuL8/bNdFfHRI=; b=eOeUyElFFHzI4zsDpkikswy1lP GkFCnXHD+HYQfra6VRYQJkbhRT7oAMJ9xAY3XpcjHWs1xITCzRECFjqRni2wFbaP71jVYsteLb3eO OStCmdY/dbnCriF/KembbnenD; 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-38; Mon, 04 Nov 2024 14:14:14 -0700 From: Tom Tromey Date: Mon, 04 Nov 2024 14:14:15 -0700 Subject: [PATCH 5/6] Remove the print_vector_info gdbarch hook MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241104-check-unused-gdbarch-v1-5-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 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-38 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: 10 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfP9hhFDp0N/A5pdOtG+SJTvgJwmb8IBL5uDCToYnqFaL6+eniSFa8oIlxiWVjKUDJlO7wpJFdLmU9z1h3XEQGUZUsFSULjDnzy7kpf3/LsCrInnq6qTB tsHH1svgLCTMGhuzEO+GdjqYkUHgwEWlkD74vLrsvPyQVnJ5xlFhg5XHVSb8NPvznbsWtsbI1zQhZlP8VNWSnzpjagvnWc4S1BM= 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 print_vector_info gdbarch hook has apparently never been set by any arch. This patch removes it. --- gdb/gdbarch-gen.c | 32 -------------------------------- gdb/gdbarch-gen.h | 6 ------ gdb/gdbarch_components.py | 11 ----------- gdb/infcmd.c | 21 +++++++-------------- 4 files changed, 7 insertions(+), 63 deletions(-) diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c index 534ed35f3bba3b6ebe1a034198f5f7e16e756e72..47f068967cce0e44f1e3e6a5b7eee485320ae705 100644 --- a/gdb/gdbarch-gen.c +++ b/gdb/gdbarch-gen.c @@ -99,7 +99,6 @@ struct gdbarch gdbarch_code_of_frame_writable_ftype *code_of_frame_writable = default_code_of_frame_writable; gdbarch_print_registers_info_ftype *print_registers_info = default_print_registers_info; gdbarch_print_float_info_ftype *print_float_info = default_print_float_info; - gdbarch_print_vector_info_ftype *print_vector_info = nullptr; gdbarch_register_sim_regno_ftype *register_sim_regno = legacy_register_sim_regno; gdbarch_cannot_fetch_register_ftype *cannot_fetch_register = cannot_register_not; gdbarch_cannot_store_register_ftype *cannot_store_register = cannot_register_not; @@ -357,7 +356,6 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of code_of_frame_writable, invalid_p == 0. */ /* Skip verify of print_registers_info, invalid_p == 0. */ /* Skip verify of print_float_info, invalid_p == 0. */ - /* Skip verify of print_vector_info, has predicate. */ /* Skip verify of register_sim_regno, invalid_p == 0. */ /* Skip verify of cannot_fetch_register, invalid_p == 0. */ /* Skip verify of cannot_store_register, invalid_p == 0. */ @@ -740,12 +738,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: print_float_info = <%s>\n", host_address_to_string (gdbarch->print_float_info)); - gdb_printf (file, - "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", - gdbarch_print_vector_info_p (gdbarch)); - gdb_printf (file, - "gdbarch_dump: print_vector_info = <%s>\n", - host_address_to_string (gdbarch->print_vector_info)); gdb_printf (file, "gdbarch_dump: register_sim_regno = <%s>\n", host_address_to_string (gdbarch->register_sim_regno)); @@ -2354,30 +2346,6 @@ set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch->print_float_info = print_float_info; } -bool -gdbarch_print_vector_info_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->print_vector_info != NULL; -} - -void -gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->print_vector_info != NULL); - if (gdbarch_debug >= 2) - gdb_printf (gdb_stdlog, "gdbarch_print_vector_info called\n"); - gdbarch->print_vector_info (gdbarch, file, frame, args); -} - -void -set_gdbarch_print_vector_info (struct gdbarch *gdbarch, - gdbarch_print_vector_info_ftype print_vector_info) -{ - gdbarch->print_vector_info = print_vector_info; -} - int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) { diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 6b5ebcc28516f942ffa33c288e5d6c1aab7d9aac..d96bbe94f07b17a5ed173bdf20b3bfee7ff70cfa 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -372,12 +372,6 @@ typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct u extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args); extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info); -extern bool gdbarch_print_vector_info_p (struct gdbarch *gdbarch); - -typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args); -extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args); -extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info); - /* MAP a GDB RAW register number onto a simulator register number. See also include/...-sim.h. */ diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index f79d61559b8e4c50a66258284376f454072f4112..78d9521154f629740bced42a44300c20a1e2b2cb 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -719,17 +719,6 @@ Method( invalid=False, ) -Method( - type="void", - name="print_vector_info", - params=[ - ("struct ui_file *", "file"), - ("const frame_info_ptr &", "frame"), - ("const char *", "args"), - ], - predicate=True, -) - Method( comment=""" MAP a GDB RAW register number onto a simulator register number. See diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 74873b9f7c80fa2ec299f528cde748161882c175..db9d6e66b57b700b7dc9b7bd6176fdc0ac888ef3 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2404,25 +2404,18 @@ print_vector_info (struct ui_file *file, const frame_info_ptr &frame, const char *args) { struct gdbarch *gdbarch = get_frame_arch (frame); + int printed_something = 0; - if (gdbarch_print_vector_info_p (gdbarch)) - gdbarch_print_vector_info (gdbarch, file, frame, args); - else + for (int regnum = 0; regnum < gdbarch_num_cooked_regs (gdbarch); regnum++) { - int regnum; - int printed_something = 0; - - for (regnum = 0; regnum < gdbarch_num_cooked_regs (gdbarch); regnum++) + if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup)) { - if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup)) - { - printed_something = 1; - gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1); - } + printed_something = 1; + gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1); } - if (!printed_something) - gdb_printf (file, "No vector information\n"); } + if (!printed_something) + gdb_printf (file, "No vector information\n"); } static void -- 2.46.1