From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sIO0DaItUmc8UwUAWB0awg (envelope-from ) for ; Thu, 05 Dec 2024 17:48:02 -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=CT6PEWBQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 34D941E197; Thu, 5 Dec 2024 17:48:02 -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 BF6AE1E05C for ; Thu, 5 Dec 2024 17:48:01 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4AA713858D35 for ; Thu, 5 Dec 2024 22:48:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AA713858D35 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=CT6PEWBQ 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 B1E893858D20 for ; Thu, 5 Dec 2024 22:47:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1E893858D20 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 B1E893858D20 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=1733438848; cv=none; b=clTjarT+M9P5xr9xlcAg5lJmtcv8iLIArASlOdQJevpvULCScfStZN/LyvfMHTRUE0d+Aj5U2I0TApMMFe4mVEazb0y6kiA7SwoYg49gjxFZRb4jZFMM8qEKIRChHYvQ/00RiaEbqvGDw1x4eYwEejgNppeXltXmYDWMLUgDDJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733438848; c=relaxed/simple; bh=EGq2URSE0SH5QJMf7CnAamY9qZlERx+/nJJ3fPS+png=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=xCHDj00YMETCoZ4wOFGIOcxESihHKMas4h199xWG2GzOQQR2MTM0f0VNKci2WYZYXMM8DTwnhQdY9AoAZ5cxhOcanRJpNJ1PB8zefOgCa5xa5wUcJypc3eFhBt+du8bACVqlCfh+NKar+u5e5a340X4OaaF8lVM1FuhXBVrSrtE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1E893858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733438848; 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=SSv77VKJllsOTyzVSqWv39FW9yRcARFnGBUvaCNbMIc=; b=CT6PEWBQvs0xSCY9VyIM9p34yUxGtS5B8FnZ/0c5XlxlYi20r+MFTXbJf0XkB1wcUXGX2g azQ+ETTPnsVDWHkRZgJ2WNiTkyTnLBer/Lvg02hhy9uz+bzJh3ABxYIcpZDw6NGrEYqydG iHDnlgGC6owmH+QrsRwlUUoSX2kWDNU= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-126-9xXCnca3PXi_TsrQ6U4BPQ-1; Thu, 05 Dec 2024 17:47:27 -0500 X-MC-Unique: 9xXCnca3PXi_TsrQ6U4BPQ-1 X-Mimecast-MFC-AGG-ID: 9xXCnca3PXi_TsrQ6U4BPQ Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-7251d37eac5so1701199b3a.0 for ; Thu, 05 Dec 2024 14:47:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733438846; x=1734043646; 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=SSv77VKJllsOTyzVSqWv39FW9yRcARFnGBUvaCNbMIc=; b=l8iiRDWbQHPf6ltIpjFlxyQKf0m4GWq4R/q0yBu4J0gGIZfxouXGWY4ZENdGR+kVhN Nm8Vi8hqhd653CzJOrV1yXpyYGG3dX6tzNlXKy5kTOGwG7c0FrvdU/j9qkWU4Cjq6kbN 2YtlkjRfSnk218wzpscOCKlTpFyZiOQBsyXQeixKBL4+AT/ksxIlW4KwfQJEVz7nj2jX HYqUkIRSL9txs/O6lo6O+BEzOhOl8801DXH6cYzCeeDoJN7EtmQGVAR8LdLrNWfjX3GQ YJ2Cul8+tCd4sxxdtl5kEewrmoiL84/2iKpY6XWC5or0N3bgyfJn4QqM9xUFU3r+eWIs ApkQ== X-Forwarded-Encrypted: i=1; AJvYcCVzCogj9c78o0kuEoq7zMiobRGmWCRDDGlzKZRscEQx151Ol3Z0TD9T0KRfjWuZLr8h1+Lq4EZwaHVUHw==@sourceware.org X-Gm-Message-State: AOJu0YycKtOKVgBIZWKPgErwFtlGZtY95ei5FOJ624xhIJ19v32NLaDq YwUW1WPXLXDtUYTJeLm3H2fssdClvJjGLCKbchMWSm0sp29LzHhAOTv5rJ9vJNnpqXTpLBfDQ+T lRRtte55WX6UEVCqlo6H10yMRa7ZuIDAToiZQCFKpv+f8lV0pgM7l+wibTEWBSoP5wCbD8g== X-Gm-Gg: ASbGncttJCSihFd9yIszAFkTT4XQbYZzdF1yLtiQ9V4mHHnM0a++/HGIgWmo7aviLrr UKAy5Zk3mW1u5e15IHN6AzMDd/tcA5J+2dAowKVZj2A7NlxLHaNmCGyCklDEXZtiPiuOfWf05/S JVy1GzQR9geWf1o17YhjbQwPCPNz0NZqx3o1ec/abqlw7Cy7lmslRo35qKTNpXsvgs/EiM4/Ahr Rwxje8JhDTIIX5VdfVp40IhTioVkq5YwiWNQwVrPBrUmdqFd7YjSFg= X-Received: by 2002:a05:6a00:148d:b0:725:ab14:6249 with SMTP id d2e1a72fcca58-725b811c6b0mr1461132b3a.2.1733438846027; Thu, 05 Dec 2024 14:47:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYyXvOL8Nz16flAAl0TjEG4lQb/vOsVRaCVf9mp1FQ+NsXT79FSTJ9p9L+HToIx6x+n7YeKQ== X-Received: by 2002:a05:6a00:148d:b0:725:ab14:6249 with SMTP id d2e1a72fcca58-725b811c6b0mr1461114b3a.2.1733438845656; Thu, 05 Dec 2024 14:47:25 -0800 (PST) Received: from [150.1.200.127] ([172.56.107.48]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725a29e8df0sm1811932b3a.68.2024.12.05.14.47.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Dec 2024 14:47:25 -0800 (PST) Message-ID: Date: Thu, 5 Dec 2024 14:47:24 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] Add check-gdbarch.py To: Tom Tromey , gdb-patches@sourceware.org References: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> <20241104-check-unused-gdbarch-v1-1-7082f2121077@tromey.com> From: Keith Seitz In-Reply-To: <20241104-check-unused-gdbarch-v1-1-7082f2121077@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zAqO8WiC0YuckIyJ-f43ljQR1hpQzdtx8Kl-y_NWtqc_1733438846 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, On 11/4/24 1:14 PM, Tom Tromey wrote: > This adds a new check-gdbarch.py script. This script checks the > sources to see which gdbarch methods are set but never called, and > which ones are called but never set. While I was playing with this, I (naively?) tried to run the script from my play branch in my virgin master branch. Much to my surprise, it output exactly the same output as when it was run in my play branch (which contains this entire series). Do we care? If not, please feel free to ignore this. It's a pretty easy thing to change: diff --git a/gdb/check-gdbarch.py b/gdb/check-gdbarch.py index 6f2983c7984..da27c481017 100755 --- a/gdb/check-gdbarch.py +++ b/gdb/check-gdbarch.py @@ -21,9 +21,14 @@ import fileinput import glob +import os import re import sys +# Insert CWD in case this script is run from some other gdb src +# directory. +sys.path.insert(0, os.getcwd()) + # gdbarch_components is imported only for its side-effect of filling # `gdbarch_types.components`. import gdbarch_components # noqa: F401 # type: ignore Keith