[v2,08/11] gdb: update comments of global_symbol_searcher::expand_symtabs
Commit Message
From: Simon Marchi <simon.marchi@efficios.com>
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(-)
Comments
simon.marchi@polymtl.ca writes:
> From: Simon Marchi <simon.marchi@efficios.com>
>
> 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".
LGTM.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks,
Andrew
@@ -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)
{
@@ -2687,9 +2687,10 @@ class global_symbol_searcher
/* Compile M_SYMBOL_TYPE_REGEXP, if set. */
std::optional<compiled_regex> 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<compiled_regex> &name_regex) const;