aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
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.c
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.c')
-rw-r--r--gdb/minsyms.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 8ac5014..18cf672 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1291,6 +1291,27 @@ install_minimal_symbols (struct objfile *objfile)
}
}
+/* See minsyms.h. */
+
+void
+terminate_minimal_symbol_table (struct objfile *objfile)
+{
+ if (! objfile->msymbols)
+ objfile->msymbols = ((struct minimal_symbol *)
+ obstack_alloc (&objfile->objfile_obstack,
+ sizeof (objfile->msymbols[0])));
+
+ {
+ struct minimal_symbol *m
+ = &objfile->msymbols[objfile->minimal_symbol_count];
+
+ memset (m, 0, sizeof (*m));
+ /* Don't rely on these enumeration values being 0's. */
+ MSYMBOL_TYPE (m) = mst_unknown;
+ SYMBOL_SET_LANGUAGE (m, language_unknown);
+ }
+}
+
/* Sort all the minimal symbols in OBJFILE. */
void