From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0ZM1FohF4Wlo4xwAWB0awg (envelope-from ) for ; Thu, 16 Apr 2026 16:24:40 -0400 Received: by simark.ca (Postfix, from userid 112) id 4DA221E0BC; Thu, 16 Apr 2026 16:24:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 723EE1E0BC for ; Thu, 16 Apr 2026 16:24:36 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 099DC4BB58F5 for ; Thu, 16 Apr 2026 20:24:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 099DC4BB58F5 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 8DCA54BAD17B for ; Thu, 16 Apr 2026 20:24:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DCA54BAD17B Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DCA54BAD17B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776371051; cv=none; b=baheceyMcE8Mb2vl7dYKv5s+/X7cG0VOAhBtJurnE9wKSxcHETqBoIrt80kV5OrzmKzWLVj9Ih+soCo1n/VLDcQUEGmFEtyi3MrrQnnEZlgG8woQpgWtZfqnmXc58rvHEA/k1sPCIFgw6Y7uEcXnck4oEZZxLlv4F7fiWlyyldg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776371051; c=relaxed/simple; bh=cIjOv7GPRXCh0lNzLnRjx9hasTovLVPmoBjE+aWFJH0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=mv7r85/fLCeajjiziZ6RUefSvOWTFLTnklcluFogTQWHDu5zvMWao2wWryyIZvNaFVEO+dHT800B4Y6m+vsIO9D8IQQu8WYSC4yGOevRX+WsEKqHLJjfAGJw+prMVvb4RKAp/BAPBom97+smOu8huY+ezt2IL0122gjLPgoJWI8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DCA54BAD17B Received: by simark.ca (Postfix) id 496571E0BC; Thu, 16 Apr 2026 16:24:09 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 01/11] gdb/dwarf: remove unused file_match parameter from dwarf2_base_index_functions::search_one Date: Thu, 16 Apr 2026 16:16:11 -0400 Message-ID: <20260416202408.422441-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260416202408.422441-1-simon.marchi@efficios.com> References: <20260416202408.422441-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 `file_matcher` parameter is unused. The information from `file_matcher` is actually encoded in `cus_to_skip`. All callers to this: auto_bool_vector cus_to_skip; dw_search_file_matcher (per_objfile, cus_to_skip, file_matcher); ... which populates `cus_to_skip` with all the CUs that do not match `file_matcher`. Change-Id: I7fd642f84d72ad2595c1e6de38db3869cc555ce9 --- gdb/dwarf2/read.c | 13 ++++++------- gdb/dwarf2/read.h | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 4035bba6e45b..02e6c00dfef5 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -1480,8 +1480,8 @@ struct readnow_functions : public dwarf2_base_index_functions || per_cu->unit_type (false) == 0 || per_objfile->get_compunit_symtab (per_cu.get ()) == nullptr) continue; - if (!search_one (per_cu.get (), per_objfile, cus_to_skip, file_matcher, - listener, lang_matcher)) + if (!search_one (per_cu.get (), per_objfile, cus_to_skip, listener, + lang_matcher)) return false; } return true; @@ -1923,7 +1923,6 @@ dwarf2_base_index_functions::search_one (dwarf2_per_cu *per_cu, dwarf2_per_objfile *per_objfile, auto_bool_vector &cus_to_skip, - search_symtabs_file_matcher file_matcher, search_symtabs_expansion_listener listener, search_symtabs_lang_matcher lang_matcher) { @@ -14056,8 +14055,8 @@ cooked_index_functions::search { QUIT; - if (!search_one (per_cu, per_objfile, cus_to_skip, file_matcher, - listener, lang_matcher)) + if (!search_one (per_cu, per_objfile, cus_to_skip, listener, + lang_matcher)) return false; } return true; @@ -14224,8 +14223,8 @@ cooked_index_functions::search bool check = entry->visit_defining_cus ([&] (dwarf2_per_cu *per_cu) { - return search_one (per_cu, per_objfile, cus_to_skip, - file_matcher, listener, nullptr); + return search_one (per_cu, per_objfile, cus_to_skip, listener, + nullptr); }); if (!check) return false; diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 1150c3cfdcad..fddaaa7d9e5c 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -1318,11 +1318,11 @@ struct dwarf2_base_index_functions : public quick_symbol_functions bool need_fullname) override; protected: - /* If FILE_MATCHER is NULL and if CUS_TO_SKIP does not include the CU's index, - expand the CU and call LISTENER on it. */ + /* If CUS_TO_SKIP does not include the CU's index and the CU's language + matches LANG_MATCHER, expand the CU and call LISTENER (if provided) on + it. */ bool search_one (dwarf2_per_cu *per_cu, dwarf2_per_objfile *per_objfile, auto_bool_vector &cus_to_skip, - search_symtabs_file_matcher file_matcher, search_symtabs_expansion_listener listener, search_symtabs_lang_matcher lang_matcher); }; -- 2.53.0