get_symbol_address and get_msymbol_address call
lookup_minimal_symbol_linkage, which iterates over the separate debug
files of the objfile that is passed in.
This means that if these functions pass in a separate debug objfile,
then they are doing unnecessary work.
This patch avoids the extra work by skipping separate debug objfiles
in the loops.
gdb/ChangeLog
2020-04-10 Tom Tromey <tromey@adacore.com>
* symtab.c (get_symbol_address, get_msymbol_address): Skip
separate debug files.
+2020-04-10 Tom Tromey <tromey@adacore.com>
+
+ * symtab.c (get_symbol_address, get_msymbol_address): Skip
+ separate debug files.
+
2020-04-10 Hannes Domani <ssbssa@yahoo.de>
* nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
for (objfile *objfile : current_program_space->objfiles ())
{
+ if (objfile->separate_debug_objfile_backlink != nullptr)
+ continue;
+
bound_minimal_symbol minsym
= lookup_minimal_symbol_linkage (linkage_name, objfile);
if (minsym.minsym != nullptr)
for (objfile *objfile : current_program_space->objfiles ())
{
- if ((objfile->flags & OBJF_MAINLINE) != 0)
+ if (objfile->separate_debug_objfile_backlink == nullptr
+ && (objfile->flags & OBJF_MAINLINE) != 0)
{
bound_minimal_symbol found
= lookup_minimal_symbol_linkage (linkage_name, objfile);