diff options
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index b8339f26d65..0e24663a35e 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -609,15 +609,15 @@ prim_record_minimal_symbol (name, address, ms_type, objfile) case mst_text: case mst_file_text: case mst_solib_trampoline: - section = SECT_OFF_TEXT; + section = SECT_OFF_TEXT (objfile); break; case mst_data: case mst_file_data: - section = SECT_OFF_DATA; + section = SECT_OFF_DATA (objfile); break; case mst_bss: case mst_file_bss: - section = SECT_OFF_BSS; + section = SECT_OFF_BSS (objfile); break; default: section = -1; @@ -685,7 +685,7 @@ prim_record_minimal_symbol_and_info (name, address, ms_type, info, section, MSYMBOL_INFO (msymbol) = info; /* FIXME! */ /* The hash pointers must be cleared! If they're not, - MSYMBOL_HASH_ADD will NOT add this msymbol to the hash table. */ + add_minsym_to_hash_table will NOT add this msymbol to the hash table. */ msymbol->hash_next = NULL; msymbol->demangled_hash_next = NULL; @@ -743,10 +743,8 @@ compare_minimal_symbols (fn1p, fn2p) obstack and then simply blow the obstack away when we are done with it. Is it worth the extra trouble though? */ -/* ARGSUSED */ -void -discard_minimal_symbols (foo) - int foo; +static void +do_discard_minimal_symbols_cleanup (void *arg) { register struct msym_bunch *next; @@ -758,6 +756,13 @@ discard_minimal_symbols (foo) } } +struct cleanup * +make_cleanup_discard_minimal_symbols (void) +{ + return make_cleanup (do_discard_minimal_symbols_cleanup, 0); +} + + /* Compact duplicate entries out of a minimal symbol table by walking through the table and compacting out entries with duplicate addresses |