Store 'name' in block_iterator

This changes the block_iterator to store the 'name' that is used by
block_iter_match_next.  This avoids any problem where the name could
be passed inconsistently, and also makes the subsequent patches easier
to understand.
This commit is contained in:
Tom Tromey
2023-01-19 18:36:17 -07:00
parent 7bf30a4447
commit 0688bf443c
3 changed files with 20 additions and 16 deletions

View File

@@ -6081,7 +6081,7 @@ ada_add_block_symbols (std::vector<struct block_symbol> &result,
found_sym = false;
for (sym = block_iter_match_first (block, lookup_name, &iter);
sym != NULL;
sym = block_iter_match_next (lookup_name, &iter))
sym = block_iter_match_next (&iter))
{
if (symbol_matches_domain (sym->language (), sym->domain (), domain))
{