From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qf8mGKDBvWryTCEAWB0awg (envelope-from ) for ; Wed, 30 Sep 2026 22:12:48 -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=c0r220Zd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5D9101E051; Wed, 30 Sep 2026 22:12:48 -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 B9B0E1E033 for ; Wed, 30 Sep 2026 22:12:47 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE3514BB58CA for ; Thu, 1 Oct 2026 02:12:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE3514BB58CA 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=c0r220Zd Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 52BCE4BB58B7 for ; Thu, 1 Oct 2026 02:12:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52BCE4BB58B7 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 52BCE4BB58B7 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=1790820725; cv=none; b=ii9TZjnKYP5AC0TNdh/do7kNH0eRO/4zECGv6DtyaGFABlK3Zmss+CdODQv3QuRFdgX+mS4C7PFf5qHFThnvVpeGahV5GNVIFE9WeL7868/QmVxejgvMJkom338+wkCyp3fJs0iFhjhYsyVOQqQyJc9OZmLFHTedcDYjp4C2xt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790820725; c=relaxed/simple; bh=DZB1DwRsE6GXqblaVzJN17CAqKZYOZlJh7LkdmcHrTM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SGAzAXHriy4YmXTTrel5AC1Vj4HfQvPGIwc5by5PnWiav83Zvdpmimk5WrFirYIxcSqT7HnDYFsF2bPpxrFp/IlPNxlMZCS6oy/KIeqk9DQjzk/mylzaRTjXsJYxIJYLyQeQV0BNYxxlhVfOl3nSBNWGwnSjWOYRBRis5YQZbQI= 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=c0r220Zd DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52BCE4BB58B7 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 6912BwYJ168312 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2026 22:12:03 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 6912BwYJ168312 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1790820724; bh=ZaL3gcirrKhIOTUohnS2iEhkUrs2ppokYCAGM29dL6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=c0r220ZdCNrBmR7oBzqDsKmf8Dq+MYniAMBxLH8/bPnfCqdTnRwxhV+UY66vmDZJo pTXUxQ3yahLeC1cCk/aZUuvukXufp/cnkkbpxRK5w8OOUSb+wMFSb1pzI1dH7GBRbZ j9SgBQeQC7+HNsunJgA+P9YXlPEQa4MwhwcIoDCF2JN0WeJn4Qll2lW09IsCoR6k7y PwghL7Hmt+GW5LKN4FXzuOquVTFgMwp6q5ULbD+Sh2Z/0/ai4a+YyNiRJHQLLtlm82 ebtPfeBTK+riWw8Lg2Ajst22KHFTVDDgWgDuv006/bASZfL/kODpY6h5R+n+wyb+rp rjBsDqdpyBsog== Received: by simark.ca (Postfix) id 7528D1E090; Wed, 30 Sep 2026 22:11:58 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v2 11/11] gdb: fix some comments in global_symbol_searcher Date: Wed, 30 Sep 2026 22:09:28 -0400 Message-ID: <20261001020952.698419-12-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:58 +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 Fix a few comments in and around global_symbol_searcher: - The comment of global_symbol_searcher::m_exclude_minsyms refers to M_SYMBOL_REGEXP, which does not (or no longer) exist. It means M_SYMBOL_NAME_REGEXP. - The comment in global_symbol_searcher::add_matching_msymbols refers to find_pc_symtab, which does not exist anymore. The code calls find_compunit_symtab_for_pc. - The comment of global_symbol_searcher calls it a structure, but it is a class. - RESULTS_SET -> RESULT_SET - MAX_SEARCH_RESULTS -> M_MAX_SEARCH_RESULTS Change-Id: I0ec18651688406bb525752a53b9558096a798aef --- gdb/symtab.c | 2 +- gdb/symtab.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/symtab.c b/gdb/symtab.c index af748190ddd5..eb76cb83bdb4 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4942,7 +4942,7 @@ global_symbol_searcher::add_matching_msymbols continue; /* For functions we can do a quick check of whether the - symbol might be found via find_pc_symtab. */ + symbol might be found via find_compunit_symtab_for_pc. */ if (m_kind == symbol_search_kind::FUNCTION && (find_compunit_symtab_for_pc (msymbol->value_address (&objfile)) != NULL)) diff --git a/gdb/symtab.h b/gdb/symtab.h index 117d3fb0134f..bd719af66697 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2613,8 +2613,8 @@ extern std::optional compile_symbol_search_regex (const char *regexp); /* In order to search for global symbols of a particular kind matching - particular regular expressions, create an instance of this structure and - call the SEARCH member function. */ + particular regular expressions, create an instance of this class and call + the SEARCH member function. */ class global_symbol_searcher { public: @@ -2670,8 +2670,8 @@ class global_symbol_searcher /* Regular expression to match against the symbol type. */ const char *m_symbol_type_regexp = nullptr; - /* When this flag is false then minsyms that match M_SYMBOL_REGEXP will - be included in the results, otherwise they are excluded. */ + /* When this flag is false then minsyms that match M_SYMBOL_NAME_REGEXP + will be included in the results, otherwise they are excluded. */ bool m_exclude_minsyms = false; /* Maximum number of search results. We currently impose a hard limit @@ -2711,12 +2711,12 @@ class global_symbol_searcher const std::optional &name_regex) const; /* Add symbols from symtabs in OBJFILE that match NAME_REGEX, and - TYPE_REGEX, and are of type M_KIND, to the results set RESULTS_SET. + TYPE_REGEX, and are of type M_KIND, to the results set RESULT_SET. Return false if we stop adding results early due to having already found too many results (based on M_MAX_SEARCH_RESULTS limit), otherwise return true. Returning true does not indicate that any results were added, just - that we didn't _not_ add a result due to reaching MAX_SEARCH_RESULTS. */ + that we didn't _not_ add a result due to reaching M_MAX_SEARCH_RESULTS. */ bool add_matching_symbols (objfile &objfile, const std::optional &name_regex, const std::optional &type_regex, @@ -2727,7 +2727,7 @@ class global_symbol_searcher due to having already found too many results (based on max search results limit M_MAX_SEARCH_RESULTS), otherwise return true. Returning true does not indicate that any results were added, just that we - didn't _not_ add a result due to reaching MAX_SEARCH_RESULTS. */ + didn't _not_ add a result due to reaching M_MAX_SEARCH_RESULTS. */ bool add_matching_msymbols (objfile &objfile, const std::optional &name_regex, std::vector &results) const; -- 2.55.0