public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [FYI] Remove lookup_minimal_symbol_solib_trampoline
@ 2019-06-26 15:52 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-06-26 15:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

lookup_minimal_symbol_solib_trampoline is unused, so this patch
removes it.  The last use was apparently removed in
commit 61a12cfa ("Remove HPUX").

gdb/ChangeLog
2019-06-26  Tom Tromey  <tromey@adacore.com>

	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove.
	* minsyms.h (lookup_minimal_symbol_solib_trampoline): Don't
	declare.
---
 gdb/ChangeLog |  6 ++++++
 gdb/minsyms.c | 34 ----------------------------------
 gdb/minsyms.h | 12 ------------
 3 files changed, 6 insertions(+), 46 deletions(-)

diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 9d29d880aab..e64e5df1a18 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -597,40 +597,6 @@ lookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name,
   return NULL;
 }
 
-/* See minsyms.h.  */
-
-struct bound_minimal_symbol
-lookup_minimal_symbol_solib_trampoline (const char *name,
-					struct objfile *objf)
-{
-  struct minimal_symbol *msymbol;
-  struct bound_minimal_symbol found_symbol = { NULL, NULL };
-
-  unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
-
-  for (objfile *objfile : current_program_space->objfiles ())
-    {
-      if (objf == NULL || objf == objfile
-	  || objf == objfile->separate_debug_objfile_backlink)
-	{
-	  for (msymbol = objfile->per_bfd->msymbol_hash[hash];
-	       msymbol != NULL;
-	       msymbol = msymbol->hash_next)
-	    {
-	      if (strcmp (MSYMBOL_LINKAGE_NAME (msymbol), name) == 0 &&
-		  MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
-		{
-		  found_symbol.objfile = objfile;
-		  found_symbol.minsym = msymbol;
-		  return found_symbol;
-		}
-	    }
-	}
-    }
-
-  return found_symbol;
-}
-
 /* A helper function that makes *PC section-relative.  This searches
    the sections of OBJFILE and if *PC is in a section, it subtracts
    the section offset and returns true.  Otherwise it returns
diff --git a/gdb/minsyms.h b/gdb/minsyms.h
index 3e414f6ff7b..bb43165620d 100644
--- a/gdb/minsyms.h
+++ b/gdb/minsyms.h
@@ -204,18 +204,6 @@ struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
 struct bound_minimal_symbol lookup_minimal_symbol_text (const char *,
 							struct objfile *);
 
-/* Look through all the current minimal symbol tables and find the
-   first minimal symbol that matches NAME and is a solib trampoline.
-   If OBJF is non-NULL, limit the search to that objfile.  Returns a
-   pointer to the minimal symbol that matches, or NULL if no match is
-   found.
-
-   This function only searches the mangled (linkage) names.  */
-
-struct bound_minimal_symbol lookup_minimal_symbol_solib_trampoline
-    (const char *,
-     struct objfile *);
-
 /* Look through all the current minimal symbol tables and find the
    first minimal symbol that matches NAME and PC.  If OBJF is non-NULL,
    limit the search to that objfile.  Returns a pointer to the minimal
-- 
2.20.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-26 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 15:52 [FYI] Remove lookup_minimal_symbol_solib_trampoline Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).