From fea251526d32dc0bbcc7769c20daf2db3b5d9dac Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Thu, 10 Jun 2004 15:52:04 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 7 +++++++ gdb/coffread.c | 11 +++++++++++ gdb/dbxread.c | 3 +-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 415e3e57912..cdcaf371233 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2004-06-10 Brian Ford + + * 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. + 2004-06-10 Andrew Cagney * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Delete. diff --git a/gdb/coffread.c b/gdb/coffread.c index 474282ce3c1..821ca44f3bf 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); } diff --git a/gdb/dbxread.c b/gdb/dbxread.c index e33a7e43c5b..c71b0c8fd5e 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -3376,8 +3376,7 @@ coffstab_build_psymtabs (struct objfile *objfile, int mainline, } /* Scan and build partial symbols for an ELF symbol file. - This ELF file has already been processed to get its minimal symbols, - and any DWARF symbols that were in it. + This ELF file has already been processed to get its minimal symbols. This routine is the equivalent of dbx_symfile_init and dbx_symfile_read rolled into one. -- 2.30.2