aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorBrian Ford <ford@vss.fsi.com>2004-06-10 15:52:04 +0000
committerBrian Ford <ford@vss.fsi.com>2004-06-10 15:52:04 +0000
commitfea251526d32dc0bbcc7769c20daf2db3b5d9dac (patch)
tree4f217e862b2770c64d70c82692ff57dfaf3e3cc5 /gdb/coffread.c
parent30a4a8e027d143cca1ac159277d0652c1ed978e9 (diff)
downloadgdb-fea251526d32dc0bbcc7769c20daf2db3b5d9dac.zip
gdb-fea251526d32dc0bbcc7769c20daf2db3b5d9dac.tar.gz
gdb-fea251526d32dc0bbcc7769c20daf2db3b5d9dac.tar.bz2
* coffread.c (coff_symfile_read): Prevent mixed debugging formats
from corrupting/reinitializing the psymtab. Support DWARF 2 frame info. * dbxread.c (elfstab_build_psymtabs): Remove bogus comment.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 474282c..821ca44 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -603,6 +603,15 @@ coff_symfile_read (struct objfile *objfile, int mainline)
/* Free the installed minimal symbol data. */
do_cleanups (cleanup_minimal_symbols);
+ /* If we are reinitializing, or if we have not loaded syms yet,
+ empty the psymtab. "mainline" is cleared so the *_read_psymtab
+ functions do not all re-initialize it. */
+ if (mainline)
+ {
+ init_psymbol_list (objfile, 0);
+ mainline = 0;
+ }
+
bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
if (info->stabsects)
@@ -633,6 +642,8 @@ coff_symfile_read (struct objfile *objfile, int mainline)
dwarf2_build_psymtabs (objfile, mainline);
}
+ dwarf2_build_frame_info (objfile);
+
do_cleanups (back_to);
}