Simplify the public DWARF API

dwarf2_has_info and dwarf2_initialize_objfile are only separate
because the DWARF reader implemented lazy psymtab reading.  However,
now that this is gone, we can simplify the public DWARF API again.
This commit is contained in:
Tom Tromey
2023-01-01 09:51:04 -07:00
parent 33c6eaaefc
commit aecbdf5f34
6 changed files with 43 additions and 50 deletions

View File

@@ -716,10 +716,10 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
*info->stabsects,
info->stabstrsect->filepos, stabstrsize);
}
if (dwarf2_has_info (objfile, NULL))
if (dwarf2_initialize_objfile (objfile))
{
/* DWARF2 sections. */
dwarf2_initialize_objfile (objfile);
/* Nothing. */
}
/* Try to add separate debug file if no symbols table found. */