/* GDB routines for manipulating the minimal symbol tables.
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1992-2004, 2007-2012 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
static int msym_count;
-/* Compute a hash code based using the same criteria as `strcmp_iw'. */
+/* See minsyms.h. */
unsigned int
msymbol_hash_iw (const char *string)
return hash;
}
-/* Compute a hash code for a string. */
+/* See minsyms.h. */
unsigned int
msymbol_hash (const char *string)
}
}
+/* See minsyms.h. */
-/* Return OBJFILE where minimal symbol SYM is defined. */
struct objfile *
msymbol_objfile (struct minimal_symbol *sym)
{
return NULL;
}
-/* Iterate over all the minimal symbols in the objfile OBJF which
- match NAME. Both the ordinary and demangled names of each symbol
- are considered. The caller is responsible for canonicalizing NAME,
- should that need to be done.
-
- For each matching symbol, CALLBACK is called with the symbol and
- USER_DATA as arguments. */
+/* See minsyms.h. */
void
iterate_over_minimal_symbols (struct objfile *objf, const char *name,
}
}
-/* 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 pointer
- to the minimal symbol that matches, or NULL if no match is found.
-
- This function only searches the mangled (linkage) names. */
+/* See minsyms.h. */
struct minimal_symbol *
lookup_minimal_symbol_text (const char *name, struct objfile *objf)
return NULL;
}
-/* 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
- symbol that matches, or NULL if no match is found. */
+/* See minsyms.h. */
struct minimal_symbol *
lookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name,
return NULL;
}
-/* 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. */
+/* See minsyms.h. */
struct minimal_symbol *
lookup_minimal_symbol_solib_trampoline (const char *name,
return lookup_minimal_symbol_by_pc_section_1 (pc, section, 0);
}
-/* Backward compatibility: search through the minimal symbol table
- for a matching PC (no section given). */
+/* See minsyms.h. */
struct minimal_symbol *
lookup_minimal_symbol_by_pc (CORE_ADDR pc)
const struct gnu_ifunc_fns *gnu_ifunc_fns_p = &stub_gnu_ifunc_fns;
-/* Find the minimal symbol named NAME, and return both the minsym
- struct and its objfile. This only checks the linkage name. Sets
- *OBJFILE_P and returns the minimal symbol, if it is found. If it
- is not found, returns NULL. */
+/* See minsyms.h. */
struct minimal_symbol *
lookup_minimal_symbol_and_objfile (const char *name,
return 0;
}
-/* Prepare to start collecting minimal symbols. Note that presetting
- msym_bunch_index to BUNCH_SIZE causes the first call to save a minimal
- symbol to allocate the memory for the first bunch. */
+/* See minsyms.h. */
void
init_minimal_symbol_collection (void)
{
msym_count = 0;
msym_bunch = NULL;
+ /* Note that presetting msym_bunch_index to BUNCH_SIZE causes the
+ first call to save a minimal symbol to allocate the memory for
+ the first bunch. */
msym_bunch_index = BUNCH_SIZE;
}
+/* See minsyms.h. */
+
void
prim_record_minimal_symbol (const char *name, CORE_ADDR address,
enum minimal_symbol_type ms_type,
section, NULL, objfile);
}
-/* Record a minimal symbol in the msym bunches. Returns the symbol
- newly created. */
+/* See minsyms.h. */
struct minimal_symbol *
prim_record_minimal_symbol_full (const char *name, int name_len, int copy_name,
return msymbol;
}
-/* Record a minimal symbol in the msym bunches. Returns the symbol
- newly created. */
+/* See minsyms.h. */
struct minimal_symbol *
prim_record_minimal_symbol_and_info (const char *name, CORE_ADDR address,
}
}
+/* See minsyms.h. */
+
struct cleanup *
make_cleanup_discard_minimal_symbols (void)
{
build_minimal_symbol_hash_tables (objfile);
}
-/* Check if PC is in a shared library trampoline code stub.
- Return minimal symbol for the trampoline entry or NULL if PC is not
- in a trampoline code stub. */
+/* See minsyms.h. */
struct minimal_symbol *
lookup_solib_trampoline_symbol_by_pc (CORE_ADDR pc)