[binutils-gdb] Use bool in map_matching_symbols
Tom Tromey via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e079df53007defb3ab6e4ce8f353138bc8aef86a commit e079df53007defb3ab6e4ce8f353138bc8aef86a Author: Tom Tromey <[email protected]> Date: Wed Apr 15 08:02:17 2026 -0600 Use bool in map_matching_symbols This changes ada-lang.c:map_matching_symbols to take a bool parameter, then fixes up the callers. Approved-By: Andrew Burgess <[email protected]> Diff: --- gdb/ada-lang.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 94907072339..0600394361c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5527,7 +5527,7 @@ static void map_matching_symbols (struct objfile *objfile, const lookup_name_info &lookup_name, domain_search_flags domain, - int global, + bool global, match_data &data) { data.objfile = objfile; @@ -5548,13 +5548,13 @@ map_matching_symbols (struct objfile *objfile, /* Add to RESULT all non-local symbols whose name and domain match LOOKUP_NAME and DOMAIN respectively. The search is performed on - GLOBAL_BLOCK symbols if GLOBAL is non-zero, or on STATIC_BLOCK + GLOBAL_BLOCK symbols if GLOBAL is true, or on STATIC_BLOCK symbols otherwise. */ static void add_nonlocal_symbols (std::vector<struct block_symbol> &result, const lookup_name_info &lookup_name, - domain_search_flags domain, int global) + domain_search_flags domain, bool global) { struct match_data data (&result); @@ -5657,13 +5657,13 @@ ada_add_all_symbols (std::vector<struct block_symbol> &result, /* Search symbols from all global blocks. */ - add_nonlocal_symbols (result, lookup_name, domain, 1); + add_nonlocal_symbols (result, lookup_name, domain, true); /* Now add symbols from all per-file blocks if we've gotten no hits (not strictly correct, but perhaps better than an error). */ if (result.empty ()) - add_nonlocal_symbols (result, lookup_name, domain, 0); + add_nonlocal_symbols (result, lookup_name, domain, false); } /* Find symbols in DOMAIN matching LOOKUP_NAME, in BLOCK and, if FULL_SEARCH