summaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-02-20 18:31:14 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-02-20 18:31:14 +0000
commitfc60cea0175a5d47b10eb619d74beba252c2e540 (patch)
tree8cd739637707c98e3180642550545f1ed185a8d0 /gdb/mdebugread.c
parentd5bc8a9882f3edead01b48f8f7127cd198c8710d (diff)
downloadgdb-fc60cea0175a5d47b10eb619d74beba252c2e540.tar.gz
* 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/mdebugread.c')
-rw-r--r--gdb/mdebugread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index ac49ca0fafd..51536d71cc6 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -4809,6 +4809,14 @@ elfmdebug_build_psymtabs (struct objfile *objfile,
{
bfd *abfd = objfile->obfd;
struct ecoff_debug_info *info;
+ struct cleanup *back_to;
+
+ /* FIXME: It's not clear whether we should be getting minimal symbol
+ information from .mdebug in an ELF file, or whether we will.
+ Re-initialize the minimal symbol reader in case we do. */
+
+ init_minimal_symbol_collection ();
+ back_to = make_cleanup_discard_minimal_symbols ();
info = ((struct ecoff_debug_info *)
obstack_alloc (&objfile->psymbol_obstack,
@@ -4819,6 +4827,9 @@ elfmdebug_build_psymtabs (struct objfile *objfile,
bfd_errmsg (bfd_get_error ()));
mdebug_build_psymtabs (objfile, swap, info);
+
+ install_minimal_symbols (objfile);
+ do_cleanups (back_to);
}