From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uTfJAI7BvWryTCEAWB0awg (envelope-from ) for ; Wed, 30 Sep 2026 22:12:30 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=LT7eTydv; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F33F11E033; Wed, 30 Sep 2026 22:12:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 81EC61E033 for ; Wed, 30 Sep 2026 22:12:29 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC0034BB58F9 for ; Thu, 1 Oct 2026 02:12:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC0034BB58F9 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=LT7eTydv Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 5E1B54BB58B2 for ; Thu, 1 Oct 2026 02:12:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E1B54BB58B2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5E1B54BB58B2 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790820724; cv=none; b=fVMOatx4kX62PQs4XixJXJaWxLvRFcXc7JDMxGTv14u7JikjX1rqOE7TTVYHQR52ZLbkvQ1IzM3AzUvxYyMOeEjPCBzOm5U9RBX1xM+3opqFeAmIgeLcMoU+x1xKAdlbnpb/0VooMiTpzptvrJM9ff84WVIa12vHA4tpfX2beSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790820724; c=relaxed/simple; bh=uG0BGU8ijPgh1XIBe9dYwB61XCoy7m8oD0mLwC+ROho=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qNVQK8jhH/p4NDH+SfQmxUhAWZc6x5aLYwYZ2wKu5kMx8nE1zzM79X0Fbn+zowNyF5ihNIYdbrgUvDslGJ8xcV8yP05kEpJgmxtIFIwnn4j0Kv2kQBWud1UGo+V6X6ezRICa1iyw5u+qx5VAZtHxjKc6InPXmyi7lXaPQ0ixhRI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=LT7eTydv DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E1B54BB58B2 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 6912BvMU168301 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2026 22:12:02 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 6912BvMU168301 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1790820723; bh=bzouN2LlhizjHubEVbYp6qslI9QGO2cExiJ22R5p16I=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=LT7eTydv3n40mtsa4WYlBbWPgxKFCDjwpurdllfeel3g9pgybAiBpASsCDh71sHo2 qXcA4EEF3+CUy0AYp8Fv1XMWS5GB0uut/3IJFacuGwbEJ3dfTJTMlaI6yPtrC54sng VItBoWPtXYfd3NUpaG0xsyY6+V5Cam8ecKO6bHc2geJuJI536NAYM+RkGOckmm2EY5 ZjrGZKSNSFy89rF6qykt20AEwEktD7nxuiX3YaOBgOH0igMYPPpbM9+mekU1/+ntmv 5IXAejy3EwaTRq+faArhbWTMir0xaElL4MjpWuC3LeEw1ueKHJ7xZ+a65ELWTWl+9y T1BI/67WaafHw== Received: by simark.ca (Postfix) id 900501E033; Wed, 30 Sep 2026 22:11:57 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v2 08/11] gdb: update comments of global_symbol_searcher::expand_symtabs Date: Wed, 30 Sep 2026 22:09:25 -0400 Message-ID: <20261001020952.698419-9-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260929194119.155169-1-simon.marchi@efficios.com> References: <20260929194119.155169-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 1 Oct 2026 02:11:57 +0000 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 From: Simon Marchi Update the doc comment of expand_symtabs to describe more accurately what the return value means. It is true when a matching function msymbol for which no debug info exists is found. Update a comment inside expand_symtabs: - remove "unconditionally", because it's not quite true - use "for variables" instead of "for SEARCH_VAR_DOMAIN". Change-Id: I7c26c065b31575066ed2398563cdc1dac8869f8b --- gdb/symtab.c | 4 ++-- gdb/symtab.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gdb/symtab.c b/gdb/symtab.c index a436e9011626..fc0ff22448ee 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4779,8 +4779,8 @@ global_symbol_searcher::expand_symtabs objfiles. Variables are not handled here, and looking them up does not expand any - symtab. When no file names were given the caller unconditionally rescans - the minimal symbols for SEARCH_VAR_DOMAIN. */ + symtab. When no file names were given the caller rescans the minimal + symbols for variables. */ if (m_filenames.empty () && m_kind == symbol_search_kind::FUNCTION) { diff --git a/gdb/symtab.h b/gdb/symtab.h index 7afefaf3a322..28b9d7b4c78d 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2687,9 +2687,10 @@ class global_symbol_searcher /* Compile M_SYMBOL_TYPE_REGEXP, if set. */ std::optional compile_type_regex () const; - /* Expand symtabs in OBJFILE that match NAME_REGEX, are of type M_KIND. - Return true if any msymbols were seen that we should later consider - adding to the results list. */ + /* Expand symtabs in OBJFILE that match NAME_REGEX and are of type M_KIND. + Return true if a matching function msymbol without debug info was + seen, meaning that msymbols should later be considered for the results + list. */ bool expand_symtabs (objfile *objfile, const std::optional &name_regex) const; -- 2.55.0