aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-06-21 15:30:20 +0200
committerTom de Vries <tdevries@suse.de>2021-06-24 17:44:35 +0200
commita74154769cf170d40d215f3367865d1577315904 (patch)
treefbb2906cbbf7c874a0dce4d1a6ddd82e4d73de11
parent7545a484ad391f59690d747eff32c8beb04c68bd (diff)
downloadbinutils-a74154769cf170d40d215f3367865d1577315904.zip
binutils-a74154769cf170d40d215f3367865d1577315904.tar.gz
binutils-a74154769cf170d40d215f3367865d1577315904.tar.bz2
[gdb/symtab] Keep track of interesting_symbols in partial_symtab
-rw-r--r--gdb/psympriv.h8
-rw-r--r--gdb/psymtab.c7
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/psympriv.h b/gdb/psympriv.h
index adbced8..597d120 100644
--- a/gdb/psympriv.h
+++ b/gdb/psympriv.h
@@ -328,6 +328,14 @@ struct partial_symtab
struct partial_symtab **dependencies = nullptr;
+ std::set<sect_offset> 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 64f0921..635cebc 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++;