+2009-12-02 Tristan Gingold <gingold@adacore.com>
+
+ * symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in
+ prototype.
+ * dwarf2read.c (dwarf2_build_psymtabs): Remove mainline paramter in
+ definition, simplify code assuming it is always 0.
+ * coffread.c (coff_symfile_read): Adjust call.
+ * elfread.c (elf_symfile_read): Ditto.
+ * machoread.c (macho_symfile_read): Explicitely calls
+ init_psymbol_list if mainline is set.
+
2009-12-02 Tristan Gingold <gingold@adacore.com>
* dwarf2read.c (dwarf2_build_psymtabs_easy): Remove mainline parameter.
if (dwarf2_has_info (objfile))
{
/* DWARF2 sections. */
- dwarf2_build_psymtabs (objfile, mainline);
+ dwarf2_build_psymtabs (objfile);
}
dwarf2_build_frame_info (objfile);
/* Build a partial symbol table. */
void
-dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
+dwarf2_build_psymtabs (struct objfile *objfile)
{
dwarf2_read_section (objfile, &dwarf2_per_objfile->info);
dwarf2_read_section (objfile, &dwarf2_per_objfile->abbrev);
dwarf2_read_section (objfile, &dwarf2_per_objfile->eh_frame);
dwarf2_read_section (objfile, &dwarf2_per_objfile->frame);
- if (mainline
- || (objfile->global_psymbols.size == 0
- && objfile->static_psymbols.size == 0))
+ if (objfile->global_psymbols.size == 0 && objfile->static_psymbols.size == 0)
{
init_psymbol_list (objfile, 1024);
}
if (dwarf2_has_info (objfile))
{
/* DWARF 2 sections */
- dwarf2_build_psymtabs (objfile, mainline);
+ dwarf2_build_psymtabs (objfile);
}
/* FIXME: kettenis/20030504: This still needs to be integrated with
}
}
+ /* If we are reinitializing, or if we have never loaded syms yet,
+ set table to empty. */
+ if (mainline)
+ init_psymbol_list (objfile, 0);
+
if (dwarf2_has_info (objfile))
{
/* DWARF 2 sections */
- dwarf2_build_psymtabs (objfile, mainline);
+ dwarf2_build_psymtabs (objfile);
}
/* Do not try to read .eh_frame/.debug_frame as they are not relocated
extern int dwarf2_has_info (struct objfile *);
-extern void dwarf2_build_psymtabs (struct objfile *, int);
+extern void dwarf2_build_psymtabs (struct objfile *);
extern void dwarf2_build_frame_info (struct objfile *);
void dwarf2_free_objfile (struct objfile *);