forked from Imagelibrary/binutils-gdb
* coffread.c (coff_symfile_read): Clean up minimal symbols earlier.
* dbxread.c (elfstab_build_psymtabs): Don't call install_minimal_symbols. (stabsect_build_psymtabs): Likewise. * elfread.c (elf_symfile_read): Call install_minimal_symbols earlier. * somread.c (som_symfile_read): Call install_minimal_symbols and do_cleanups earlier. * nlmread.c (nlm_symfile_read): Likewise. * mdebugread.c (elfmdebug_build_psymtabs): Call install_minimal_symbols and make appropriate cleanups.
This commit is contained in:
@@ -518,7 +518,7 @@ coff_symfile_read (struct objfile *objfile, int mainline)
|
||||
unsigned int num_symbols;
|
||||
int symtab_offset;
|
||||
int stringtab_offset;
|
||||
struct cleanup *back_to;
|
||||
struct cleanup *back_to, *cleanup_minimal_symbols;
|
||||
int stabstrsize;
|
||||
int len;
|
||||
char * target;
|
||||
@@ -598,7 +598,7 @@ coff_symfile_read (struct objfile *objfile, int mainline)
|
||||
error ("\"%s\": can't get string table", name);
|
||||
|
||||
init_minimal_symbol_collection ();
|
||||
make_cleanup_discard_minimal_symbols ();
|
||||
cleanup_minimal_symbols = make_cleanup_discard_minimal_symbols ();
|
||||
|
||||
/* Now that the executable file is positioned at symbol table,
|
||||
process it and define symbols accordingly. */
|
||||
@@ -619,6 +619,9 @@ coff_symfile_read (struct objfile *objfile, int mainline)
|
||||
|
||||
install_minimal_symbols (objfile);
|
||||
|
||||
/* Free the installed minimal symbol data. */
|
||||
do_cleanups (cleanup_minimal_symbols);
|
||||
|
||||
bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
|
||||
|
||||
if (info->stabsects)
|
||||
|
||||
Reference in New Issue
Block a user