From: Tom de Vries Date: Mon, 21 Jun 2021 13:30:20 +0000 (+0200) Subject: [gdb/symtab] Keep track of interesting_symbols in partial_symtab X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a74154769cf170d40d215f3367865d1577315904;p=thirdparty%2Fbinutils-gdb.git [gdb/symtab] Keep track of interesting_symbols in partial_symtab --- diff --git a/gdb/psympriv.h b/gdb/psympriv.h index adbced84b71..597d12084eb 100644 --- a/gdb/psympriv.h +++ b/gdb/psympriv.h @@ -328,6 +328,14 @@ struct partial_symtab struct partial_symtab **dependencies = nullptr; + std::set interesting_symbols; + + void note_interesting_symbol (partial_symbol *psym) + { + auto it = sect_off.find (psym); + interesting_symbols.emplace (it->second); + } + int number_of_dependencies = 0; /* Global symbol list. This list will be sorted after readin to diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 64f092150d5..635cebcde2d 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1100,7 +1100,12 @@ recursively_search_psymtabs { /* Found a match, so notify our caller. */ result = PST_SEARCHED_AND_FOUND; - keep_going = 0; + if (lazy_expand_symtab_p) + ps->note_interesting_symbol (*psym); + else + { + keep_going = 0; + } } } psym++;