diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-02-20 18:31:14 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-02-20 18:31:14 +0000 |
commit | 7134143f534f02e8a283bb1fc0a9f22300c90e8d (patch) | |
tree | 7df28797a4403c1f540ca84d0a1d3214ab06058e /gdb/coffread.c | |
parent | cf466558d0faa40bd6cc78b7f4e983c5a3ec883b (diff) | |
download | gdb-7134143f534f02e8a283bb1fc0a9f22300c90e8d.zip gdb-7134143f534f02e8a283bb1fc0a9f22300c90e8d.tar.gz gdb-7134143f534f02e8a283bb1fc0a9f22300c90e8d.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index 912943c..db41896 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -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) |