]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/symtab] Add interesting_symbols to dwarf2_per_cu_data
authorTom de Vries <tdevries@suse.de>
Sat, 12 Jun 2021 08:33:48 +0000 (10:33 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 15:44:36 +0000 (17:44 +0200)
Make the vector interesting_symbols available during full symbols expansion.

gdb/dwarf2/read.c
gdb/dwarf2/read.h

index 16ca352a7483acf053b0e8937a6ca27dd73605d4..dc59ead86bc58ee8a4f9bb14a6c06abb50489e64 100644 (file)
@@ -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
index ee454ad300a12a74c1e90190241906bbafcbe7a9..e341bbd752c0ff251712f43cb881d2009cd5ccbc 100644 (file)
@@ -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
   {