aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-12-21 21:51:57 +0000
committerTom Tromey <tromey@redhat.com>2011-12-21 21:51:57 +0000
commitc35384fbef892f85618ca4225e5a90b38be27375 (patch)
treed0f10754e04040c9e4ccfca41ec7b5d67cb9b7a3 /gdb/minsyms.h
parenta5bd37c3cab43e33d3c2daf0586d6401e0dca8fd (diff)
downloadgdb-c35384fbef892f85618ca4225e5a90b38be27375.zip
gdb-c35384fbef892f85618ca4225e5a90b38be27375.tar.gz
gdb-c35384fbef892f85618ca4225e5a90b38be27375.tar.bz2
* symtab.h: Include minsyms.h.
(prim_record_minimal_symbol, prim_record_minimal_symbol_full) (prim_record_minimal_symbol_and_info, msymbol_hash_iw) (msymbol_hash, SYMBOL_HASH_NEXT, msymbol_objfile) (lookup_minimal_symbol, lookup_minimal_symbol_text) (lookup_minimal_symbol_solib_trampoline) (lookup_minimal_symbol_by_pc_name, lookup_minimal_symbol_by_pc) (iterate_over_minimal_symbols, lookup_minimal_symbol_and_objfile) (lookup_minimal_symbol_by_pc_section) (lookup_solib_trampoline_symbol_by_pc) (init_minimal_symbol_collection) (make_cleanup_discard_minimal_symbols, install_minimal_symbols) (msymbols_sort): Move to minsyms.h. * objfiles.c (terminate_minimal_symbol_table): Move to minsyms.c. * minsyms.c (terminate_minimal_symbol_table): Move from objfiles.c. * minsyms.h: New file.
Diffstat (limited to 'gdb/minsyms.h')
-rw-r--r--gdb/minsyms.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/gdb/minsyms.h b/gdb/minsyms.h
new file mode 100644
index 0000000..614f124
--- /dev/null
+++ b/gdb/minsyms.h
@@ -0,0 +1,107 @@
+/* Minimal symbol table definitions for GDB.
+
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef MINSYMS_H
+#define MINSYMS_H
+
+/* Functions for dealing with the minimal symbol table, really a misc
+ address<->symbol mapping for things we don't have debug symbols for. */
+
+void prim_record_minimal_symbol (const char *, CORE_ADDR,
+ enum minimal_symbol_type,
+ struct objfile *);
+
+struct minimal_symbol *prim_record_minimal_symbol_full
+ (const char *,
+ int, int, CORE_ADDR,
+ enum minimal_symbol_type,
+ int section,
+ asection *bfd_section,
+ struct objfile *);
+
+struct minimal_symbol *prim_record_minimal_symbol_and_info
+ (const char *,
+ CORE_ADDR,
+ enum minimal_symbol_type,
+ int section,
+ asection *bfd_section,
+ struct objfile *);
+
+unsigned int msymbol_hash_iw (const char *);
+
+unsigned int msymbol_hash (const char *);
+
+/* Compute the next hash value from previous HASH and the character C. This
+ is only a GDB in-memory computed value with no external files compatibility
+ requirements. */
+
+#define SYMBOL_HASH_NEXT(hash, c) \
+ ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
+
+struct objfile *msymbol_objfile (struct minimal_symbol *sym);
+
+struct minimal_symbol *lookup_minimal_symbol (const char *,
+ const char *,
+ struct objfile *);
+
+struct minimal_symbol *lookup_minimal_symbol_text (const char *,
+ struct objfile *);
+
+struct minimal_symbol *lookup_minimal_symbol_solib_trampoline
+ (const char *,
+ struct objfile *);
+
+struct minimal_symbol *lookup_minimal_symbol_by_pc_name
+(CORE_ADDR, const char *, struct objfile *);
+
+struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR);
+
+struct minimal_symbol *lookup_minimal_symbol_and_objfile (const char *,
+ struct objfile **);
+
+struct minimal_symbol *lookup_minimal_symbol_by_pc_section
+ (CORE_ADDR,
+ struct obj_section *);
+
+struct minimal_symbol *lookup_solib_trampoline_symbol_by_pc (CORE_ADDR);
+
+void init_minimal_symbol_collection (void);
+
+struct cleanup *make_cleanup_discard_minimal_symbols (void);
+
+void install_minimal_symbols (struct objfile *);
+
+/* Sort all the minimal symbols in OBJFILE. */
+
+void msymbols_sort (struct objfile *objfile);
+
+/* Create the terminating entry of OBJFILE's minimal symbol table.
+ If OBJFILE->msymbols is zero, allocate a single entry from
+ OBJFILE->objfile_obstack; otherwise, just initialize
+ OBJFILE->msymbols[OBJFILE->minimal_symbol_count]. */
+
+void terminate_minimal_symbol_table (struct objfile *objfile);
+
+void iterate_over_minimal_symbols (struct objfile *objf,
+ const char *name,
+ void (*callback) (struct minimal_symbol *,
+ void *),
+ void *user_data);
+
+#endif /* MINSYMS_H */