/* Return a quick_symbol_functions instance that refers back to this
dwarf_scanner_base. */
virtual quick_symbol_functions_up make_quick_functions () const = 0;
+
+ /* An ad hoc version check. This is needed for .gdb_index to check
+ whether a version 8 or above index is in use. Returns true if
+ the index is usable, false otherwise. */
+ virtual bool version_check () const
+ {
+ return true;
+ }
};
/* Base class containing bits shared by both .gdb_index and
{ return this->symbol_table.size () / 2; }
quick_symbol_functions_up make_quick_functions () const override;
+
+ bool version_check () const override
+ {
+ return version >= 8;
+ }
};
/* A description of the mapped .debug_names.
&& cu != NULL
&& cu->dwo_unit != NULL
&& per_objfile->per_bfd->index_table != NULL
- && per_objfile->per_bfd->index_table->version <= 7
+ && !per_objfile->per_bfd->index_table->version_check ()
/* DWP files aren't supported yet. */
&& get_dwp_file (per_objfile) == NULL)
queue_and_load_all_dwo_tus (cu);
/* For .gdb_index version 7 keep track of included TUs.
http://sourceware.org/bugzilla/show_bug.cgi?id=15021. */
if (per_objfile->per_bfd->index_table != NULL
- && per_objfile->per_bfd->index_table->version <= 7)
+ && !per_objfile->per_bfd->index_table->version_check ())
{
(*ref_cu)->per_cu->imported_symtabs_push (sig_cu->per_cu);
}