From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iMEoM4AuUmcIVAUAWB0awg (envelope-from ) for ; Thu, 05 Dec 2024 17:51:44 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=T+vHUuFB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CE2AB1E197; Thu, 5 Dec 2024 17:51:44 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable 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 31C8F1E05C for ; Thu, 5 Dec 2024 17:51:44 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC72C3858C41 for ; Thu, 5 Dec 2024 22:51:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC72C3858C41 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=T+vHUuFB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 9BA683858D20 for ; Thu, 5 Dec 2024 22:51:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BA683858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BA683858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733439061; cv=none; b=Y8bdQaxOG2ZWug88q7IGzrnomYZv0+LDOnTerOvCvokkEsVPghScqBZM7+qaeSQhGZPVwjKcYId6ukbHJfvSzTHqgN64LwdR5Dqt6l3oxeGBRf5yOwgtokDQvdlYg61o9bcu5PbfIziGOsE8fsYOTfJGtPpj1jAqi1WBabCjWVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733439061; c=relaxed/simple; bh=QYLli1gS9fE9opcdx5ON0bUKjWNdcAHO4GtWmdNnjZw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=eQFpobj28VFTnS3bdti+AI9YoMc4OG66yA2UbL47ZsHUsMdmyTNrLlpPBVuQKDhxTl+TXFRjs5gUjS/V3XwqUXd5qGHFiEB8S6S7AKbieZEt1zphC3mIkFXkTqMbH5/xeKX7QZF8H6nrM7DZ6yL98+t8ldq4HPYWVTFmH64Bd6o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BA683858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733439061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RbGIV4SCfXjHbisd1k36k+ibasIryN0QYCCztG0LgFs=; b=T+vHUuFBDlSqEGXrM/D2ZlQGeF16c66wIgiRDvB9Tl2+UhfD36DH5AlE0vWg2kCeb1j+QR +QeH3TwCmeJEipJh8/NlE5DJYjV6Q9MHNK72nXj7VJ9B7MYcONqCnFxfvnTncSewiar6x2 GQtcuCLH5dPQtdtQEp0hyrMiozx+Wvs= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-56-4j9RTVl9M4CTjG8hd-V-hQ-1; Thu, 05 Dec 2024 17:51:00 -0500 X-MC-Unique: 4j9RTVl9M4CTjG8hd-V-hQ-1 X-Mimecast-MFC-AGG-ID: 4j9RTVl9M4CTjG8hd-V-hQ Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2ee31227b58so1379375a91.3 for ; Thu, 05 Dec 2024 14:50:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733439059; x=1734043859; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RbGIV4SCfXjHbisd1k36k+ibasIryN0QYCCztG0LgFs=; b=IFhGj4iI1J3WvAiM2dY8rnh+DxIxWZDMm5pi4ryaeWzbPb7rXUAA48395o178FS7FD +wm2HsESca047wppa7eF600dR8rfhAX8/PvDYQ5TS/TEMQJSkRNr76q+9vSW7/LhS4O7 JqhljSM3PCs5n3HaP0hx48o7pD/yZ/12D3+uFxzTdudtyOsmuWA/Giq7+rOPwqx/cW5h ABNVhCvlRa5qop+lMfa/+s9xDTCa/j2NnKEr4ZJli6mqlFOEBXs751ueME153l8/ys9s bujORH00WAX93gckMlcPuLNaFBqIfr8/YHnmDa4xjizm8l++XHD7EVtkxqKPcXzE19/B 1lsg== X-Forwarded-Encrypted: i=1; AJvYcCX8zVt3hpw+8gLX5qko1hSgF/bOTWR22xskIvptqNzmv3MUmWrRk+5RQng6DhmiSN/iMDWT2+y4VME2Vg==@sourceware.org X-Gm-Message-State: AOJu0Yw2BP/O011sZhg2oBKoD3ICKmYPkxt7zNDB3se/63OdUs+5yVi1 TCY732P+4VXK+biUJDOXUwxhd2Yue8eyHSSpEUe8h9zJ8FRDZFtXRH5fsgV8Kt6GuS0pvTflnVc 5BAA7aUxeKPrkzauHPqduHlrwYv0ixURICzZC24WKdwSTcdgCQcczhwfJhWRW69CLG6dB5g== X-Gm-Gg: ASbGncvO2wvRvbBHTKNtKKWbRkPnTXKMGK8i8RnaghTHBpdbWc+jYVOzQT6qy3kqxK8 LiCYrEvYjenE9cwEkXK4yWG3laYvsa5T2H3lyYapmS6E9OCG/Jh4lo7NtWUXtKAhwtvMWN7H4ew X7dbWZodRspFOiFUdYB3pr33KvzomRl0vQeOjXCvf4X8Dntbru2U387PSqj7G2jMUXRaZgeLYQc eByGXExqymPigRRDQtMh+XQkyc5MJBhm6BS5Jfs70PQ/HhO+s9RLnM= X-Received: by 2002:a17:90b:3a81:b0:2ee:a76a:830 with SMTP id 98e67ed59e1d1-2ef6ab0cfbcmr1424008a91.24.1733439058882; Thu, 05 Dec 2024 14:50:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZh3BWPM1T18glwGY5j33NTbrMMWNVLInnjCihmNr6cG+u+MlOd17r69hnP76k82XsWU1ecg== X-Received: by 2002:a17:90b:3a81:b0:2ee:a76a:830 with SMTP id 98e67ed59e1d1-2ef6ab0cfbcmr1423982a91.24.1733439058537; Thu, 05 Dec 2024 14:50:58 -0800 (PST) Received: from [150.1.200.127] ([172.56.107.48]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef67d6ea84sm372149a91.47.2024.12.05.14.50.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Dec 2024 14:50:58 -0800 (PST) Message-ID: <41518c65-4f78-481f-b381-e120d9546d29@redhat.com> Date: Thu, 5 Dec 2024 14:50:57 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/6] Add gdbarch-checking script To: Tom Tromey , gdb-patches@sourceware.org References: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> From: Keith Seitz In-Reply-To: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 5b_PzSKFN6VSMp9jeJQ4wt3P952x0q8dSJytESuOGQE_1733439059 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Hi, Tom, [It's me again!] On 11/4/24 1:14 PM, Tom Tromey wrote: > 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. This is very nice... I've looked over the series, and I only have two minor requests (patch nos. 1 & 5). Otherwise, this series LGTM. > 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 I briefly discussed these with fche, and it certainly appears that the compiler *could* output these suffixes. However, it seems that either no one has generated a probe that does this (and/or tried to debug it), or no one has reported any problems. I agree these need further discussion, but while I understand the desire to simplify, I still lean toward keeping these around. > bfloat16_bit > half_bit > > Perhaps these should just both be 16-bit types unconditionally. It appears that both these methods were just added for parallelism with other type implementations, like "float_bit" and "float_format". Honestly, probably what I would have done until a maintainer corrected me during review! > 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. Wow, there's a lot of related code using this, even if nothing ever sets the value differently from the default... I can't help but wonder if this was needed for some port which never landed on the list or something? The work here, as noted in the ChangeLog entry, does note that this work (at commit time) was not complete. [I don't know if that has changed?] Maybe Simon has some further insight? In any case, these patches need not be delayed further for the sake of dealing with *everything* it discovered. Reviewed-By: Keith Seitz Keith > 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,