From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 9/9] gdb: fix some comments in global_symbol_searcher
Date: Tue, 29 Sep 2026 15:39:30 -0400 [thread overview]
Message-ID: <20260929194119.155169-10-simon.marchi@efficios.com> (raw)
In-Reply-To: <20260929194119.155169-1-simon.marchi@efficios.com>
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.
Change-Id: I0ec18651688406bb525752a53b9558096a798aef
---
gdb/symtab.c | 2 +-
gdb/symtab.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 10a794004d33..611815a568d6 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4944,7 +4944,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 e382b64b427c..1d92907fce2c 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -2604,8 +2604,8 @@ enum class symbol_search_kind
};
/* 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:
@@ -2661,8 +2661,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
--
2.55.0
prev parent reply other threads:[~2026-09-29 19:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 19:39 [PATCH 0/9] Cleanups " Simon Marchi
2026-09-29 19:39 ` [PATCH 1/9] gdb: add symbol_search_kind enum for global_symbol_searcher Simon Marchi
2026-09-29 19:39 ` [PATCH 2/9] gdb: factor out regexp compilation from global_symbol_searcher::search Simon Marchi
2026-09-29 19:39 ` [PATCH 3/9] gdb: simplify insertion in global_symbol_searcher::add_matching_symbols Simon Marchi
2026-09-29 19:39 ` [PATCH 4/9] gdb: use a switch on m_kind in add_matching_symbols Simon Marchi
2026-09-29 19:39 ` [PATCH 5/9] gdb: make global_symbol_searcher::is_suitable_msymbol non-static Simon Marchi
2026-09-29 19:39 ` [PATCH 6/9] gdb: update comment of global_symbol_searcher::expand_symtabs Simon Marchi
2026-09-29 19:39 ` [PATCH 7/9] gdb: add matching helpers to global_symbol_searcher Simon Marchi
2026-09-29 19:39 ` [PATCH 8/9] gdb: pass result containers by reference in global_symbol_searcher Simon Marchi
2026-09-29 19:39 ` Simon Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260929194119.155169-10-simon.marchi@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox