* symtab.h: Include minsyms.h.
[deliverable/binutils-gdb.git] / gdb / minsyms.h
1 /* Minimal symbol table definitions for GDB.
2
3 Copyright (C) 2011 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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.
11
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.
16
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/>. */
19
20 #ifndef MINSYMS_H
21 #define MINSYMS_H
22
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. */
25
26 void prim_record_minimal_symbol (const char *, CORE_ADDR,
27 enum minimal_symbol_type,
28 struct objfile *);
29
30 struct minimal_symbol *prim_record_minimal_symbol_full
31 (const char *,
32 int, int, CORE_ADDR,
33 enum minimal_symbol_type,
34 int section,
35 asection *bfd_section,
36 struct objfile *);
37
38 struct minimal_symbol *prim_record_minimal_symbol_and_info
39 (const char *,
40 CORE_ADDR,
41 enum minimal_symbol_type,
42 int section,
43 asection *bfd_section,
44 struct objfile *);
45
46 unsigned int msymbol_hash_iw (const char *);
47
48 unsigned int msymbol_hash (const char *);
49
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
52 requirements. */
53
54 #define SYMBOL_HASH_NEXT(hash, c) \
55 ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
56
57 struct objfile *msymbol_objfile (struct minimal_symbol *sym);
58
59 struct minimal_symbol *lookup_minimal_symbol (const char *,
60 const char *,
61 struct objfile *);
62
63 struct minimal_symbol *lookup_minimal_symbol_text (const char *,
64 struct objfile *);
65
66 struct minimal_symbol *lookup_minimal_symbol_solib_trampoline
67 (const char *,
68 struct objfile *);
69
70 struct minimal_symbol *lookup_minimal_symbol_by_pc_name
71 (CORE_ADDR, const char *, struct objfile *);
72
73 struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR);
74
75 struct minimal_symbol *lookup_minimal_symbol_and_objfile (const char *,
76 struct objfile **);
77
78 struct minimal_symbol *lookup_minimal_symbol_by_pc_section
79 (CORE_ADDR,
80 struct obj_section *);
81
82 struct minimal_symbol *lookup_solib_trampoline_symbol_by_pc (CORE_ADDR);
83
84 void init_minimal_symbol_collection (void);
85
86 struct cleanup *make_cleanup_discard_minimal_symbols (void);
87
88 void install_minimal_symbols (struct objfile *);
89
90 /* Sort all the minimal symbols in OBJFILE. */
91
92 void msymbols_sort (struct objfile *objfile);
93
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]. */
98
99 void terminate_minimal_symbol_table (struct objfile *objfile);
100
101 void iterate_over_minimal_symbols (struct objfile *objf,
102 const char *name,
103 void (*callback) (struct minimal_symbol *,
104 void *),
105 void *user_data);
106
107 #endif /* MINSYMS_H */
This page took 0.03525 seconds and 5 git commands to generate.