aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-06-12 10:33:48 +0200
committerTom de Vries <tdevries@suse.de>2021-06-24 17:44:36 +0200
commitfa33eebfca9d560942e456bf9246502dda20b092 (patch)
treea0683f03dbab746ce97c43058e76f4af710e76e3
parenta74154769cf170d40d215f3367865d1577315904 (diff)
downloadbinutils-fa33eebfca9d560942e456bf9246502dda20b092.zip
binutils-fa33eebfca9d560942e456bf9246502dda20b092.tar.gz
binutils-fa33eebfca9d560942e456bf9246502dda20b092.tar.bz2
[gdb/symtab] Add interesting_symbols to dwarf2_per_cu_data
Make the vector interesting_symbols available during full symbols expansion.
-rw-r--r--gdb/dwarf2/read.c8
-rw-r--r--gdb/dwarf2/read.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 16ca352..dc59ead 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -8366,7 +8366,13 @@ dwarf2_psymtab::read_symtab (struct objfile *objfile)
{
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
- gdb_assert (!per_objfile->symtab_set_p (per_cu_data));
+ if (lazy_expand_symtab_p)
+ per_cu_data->interesting_symbols = &interesting_symbols;
+ else
+ {
+ gdb_assert (!per_objfile->symtab_set_p (per_cu_data));
+ per_cu_data->interesting_symbols = nullptr;
+ }
/* If this psymtab is constructed from a debug-only objfile, the
has_section_at_zero flag will not necessarily be correct. We
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index ee454ad..e341bbd 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -217,6 +217,8 @@ struct dwarf2_per_cu_data
functions above. */
std::vector <dwarf2_per_cu_data *> *imported_symtabs = nullptr;
+ std::set <sect_offset> *interesting_symbols = nullptr;
+
/* Return true of IMPORTED_SYMTABS is empty or not yet allocated. */
bool imported_symtabs_empty () const
{