diff options
author | Tom Tromey <tom@tromey.com> | 2021-11-22 16:53:34 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-04-20 09:10:03 -0600 |
commit | f75a1d3a732d96ed4adadddaaeafe17732453256 (patch) | |
tree | 3befd6320ccd834bd306113972f0e1568fcd85a9 /gdb/dwarf2/mapped-index.h | |
parent | c1a56932c4b61f1fe81ce847cb40770203ffd16f (diff) | |
download | fsf-binutils-gdb-f75a1d3a732d96ed4adadddaaeafe17732453256.zip fsf-binutils-gdb-f75a1d3a732d96ed4adadddaaeafe17732453256.tar.gz fsf-binutils-gdb-f75a1d3a732d96ed4adadddaaeafe17732453256.tar.bz2 |
Add an ad hoc version check to dwarf_scanner_base
Some generic code in the DWARF reader has a special case for older
versions of .gdb_index. This patch adds an ad hoc version check
method so that these spots can work without specific knowledge of
which index is in use.
Diffstat (limited to 'gdb/dwarf2/mapped-index.h')
-rw-r--r-- | gdb/dwarf2/mapped-index.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/dwarf2/mapped-index.h b/gdb/dwarf2/mapped-index.h index 39a9ede..e5d7746 100644 --- a/gdb/dwarf2/mapped-index.h +++ b/gdb/dwarf2/mapped-index.h @@ -58,6 +58,14 @@ struct dwarf_scanner_base /* 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 |