From 64cc34d87089ff24b43e0a8760be132b7afa6f34 Mon Sep 17 00:00:00 2001 From: Weimin Pan Date: Tue, 29 May 2018 22:01:34 +0000 Subject: 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. --- gdb/minsyms.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'gdb/minsyms.h') diff --git a/gdb/minsyms.h b/gdb/minsyms.h index 40e69ae..f6799ef 100644 --- a/gdb/minsyms.h +++ b/gdb/minsyms.h @@ -202,11 +202,6 @@ struct bound_minimal_symbol lookup_minimal_symbol (const char *, struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *); -/* Find the minimal symbol named NAME, and return both the minsym - struct and its objfile. */ - -struct bound_minimal_symbol lookup_minimal_symbol_and_objfile (const char *); - /* Look through all the current minimal symbol tables and find the first minimal symbol that matches NAME and has text type. If OBJF is non-NULL, limit the search to that objfile. Returns a bound -- cgit v1.1