1 /* Minimal symbol table definitions for GDB.
3 Copyright (C) 2011 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* Functions for dealing with the minimal symbol table, really a misc
24 address<->symbol mapping for things we don't have debug symbols for. */
26 void prim_record_minimal_symbol (const char *, CORE_ADDR,
27 enum minimal_symbol_type,
30 struct minimal_symbol *prim_record_minimal_symbol_full
33 enum minimal_symbol_type,
35 asection *bfd_section,
38 struct minimal_symbol *prim_record_minimal_symbol_and_info
41 enum minimal_symbol_type,
43 asection *bfd_section,
46 unsigned int msymbol_hash_iw (const char *);
48 unsigned int msymbol_hash (const char *);
50 /* Compute the next hash value from previous HASH and the character C. This
51 is only a GDB in-memory computed value with no external files compatibility
54 #define SYMBOL_HASH_NEXT(hash, c) \
55 ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
57 struct objfile *msymbol_objfile (struct minimal_symbol *sym);
59 struct minimal_symbol *lookup_minimal_symbol (const char *,
63 struct minimal_symbol *lookup_minimal_symbol_text (const char *,
66 struct minimal_symbol *lookup_minimal_symbol_solib_trampoline
70 struct minimal_symbol *lookup_minimal_symbol_by_pc_name
71 (CORE_ADDR, const char *, struct objfile *);
73 struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR);
75 struct minimal_symbol *lookup_minimal_symbol_and_objfile (const char *,
78 struct minimal_symbol *lookup_minimal_symbol_by_pc_section
80 struct obj_section *);
82 struct minimal_symbol *lookup_solib_trampoline_symbol_by_pc (CORE_ADDR);
84 void init_minimal_symbol_collection (void);
86 struct cleanup *make_cleanup_discard_minimal_symbols (void);
88 void install_minimal_symbols (struct objfile *);
90 /* Sort all the minimal symbols in OBJFILE. */
92 void msymbols_sort (struct objfile *objfile);
94 /* Create the terminating entry of OBJFILE's minimal symbol table.
95 If OBJFILE->msymbols is zero, allocate a single entry from
96 OBJFILE->objfile_obstack; otherwise, just initialize
97 OBJFILE->msymbols[OBJFILE->minimal_symbol_count]. */
99 void terminate_minimal_symbol_table (struct objfile *objfile);
101 void iterate_over_minimal_symbols (struct objfile *objf,
103 void (*callback) (struct minimal_symbol *,
107 #endif /* MINSYMS_H */