diff options
author | Weimin Pan <weimin.pan@oracle.com> | 2018-05-29 22:01:34 +0000 |
---|---|---|
committer | Weimin Pan <weimin.pan@oracle.com> | 2018-05-29 22:37:07 +0000 |
commit | 64cc34d87089ff24b43e0a8760be132b7afa6f34 (patch) | |
tree | 731d4904334e28a8ae4c888fac4c387299a5c089 /gdb/minsyms.c | |
parent | e7ec8713ec12a633fcdfc5524c9ee050389b6f9d (diff) | |
download | gdb-64cc34d87089ff24b43e0a8760be132b7afa6f34.zip gdb-64cc34d87089ff24b43e0a8760be132b7afa6f34.tar.gz gdb-64cc34d87089ff24b43e0a8760be132b7afa6f34.tar.bz2 |
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.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index b98f121..9b2c800 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -990,24 +990,6 @@ static const struct gnu_ifunc_fns stub_gnu_ifunc_fns = const struct gnu_ifunc_fns *gnu_ifunc_fns_p = &stub_gnu_ifunc_fns; -/* See minsyms.h. */ - -struct bound_minimal_symbol -lookup_minimal_symbol_and_objfile (const char *name) -{ - struct bound_minimal_symbol result; - struct objfile *objfile; - - ALL_OBJFILES (objfile) - { - result = lookup_minimal_symbol (name, NULL, objfile); - if (result.minsym != NULL) - return result; - } - - memset (&result, 0, sizeof (result)); - return result; -} /* Return leading symbol character for a BFD. If BFD is NULL, |