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/coff-pe-read.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/coff-pe-read.c')
-rw-r--r-- | gdb/coff-pe-read.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c index 0e9309e..97b646a 100644 --- a/gdb/coff-pe-read.c +++ b/gdb/coff-pe-read.c @@ -220,7 +220,7 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader, forward_func_name); - msymbol = lookup_minimal_symbol_and_objfile (forward_qualified_name); + msymbol = lookup_bound_minimal_symbol (forward_qualified_name); if (!msymbol.minsym) { @@ -228,7 +228,7 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader, for (i = 0; i < forward_dll_name_len; i++) forward_qualified_name[i] = tolower (forward_qualified_name[i]); - msymbol = lookup_minimal_symbol_and_objfile (forward_qualified_name); + msymbol = lookup_bound_minimal_symbol (forward_qualified_name); } if (!msymbol.minsym) |