Removing lookup_minimal_symbol_and_objfile

Function lookup_minimal_symbol_and_objfile iterates on all objfiles and
calls lookup_minimal_symbol for each of them, effectively searching in all
objfiles.  lookup_bound_minimal_symbol calls lookup_minimal_symbol with NULL,
which also effectively searches all objfiles.  AFAIK, they do exactly the same
thing, so we can get rid of one (and lookup_minimal_symbol_and_objfile happens
to be the most inefficient because it ends up n^2 on the number of objfiles).

Tested in both aarch64-linux-gnu and amd64-linux-gnu. No regressions.
This commit is contained in:
Weimin Pan
2018-05-29 22:01:34 +00:00
parent e7ec8713ec
commit 64cc34d870
7 changed files with 15 additions and 28 deletions

View File

@ -54,7 +54,7 @@ glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
debugging programs that use shared libraries. */
struct bound_minimal_symbol resolver
= lookup_minimal_symbol_and_objfile ("_dl_runtime_resolve");
= lookup_bound_minimal_symbol ("_dl_runtime_resolve");
if (resolver.minsym)
{