]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/symtab] Keep track of interesting_symbols in partial_symtab
authorTom de Vries <tdevries@suse.de>
Mon, 21 Jun 2021 13:30:20 +0000 (15:30 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 15:44:35 +0000 (17:44 +0200)
gdb/psympriv.h
gdb/psymtab.c

index adbced84b71fc8676efa6d22e528b5b49dd93b56..597d12084ebfa14b96ea9fed1efccbcd79c4aa89 100644 (file)
@@ -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
index 64f092150d5d8514a821c949bab47fd36a7ca35f..635cebcde2da8dc57e70c54f3d41d9e9179d504a 100644 (file)
@@ -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++;