8 Commits

Author SHA1 Message Date
19455ee11d gdb/dwarf: rename cooked_index_vector to cooked_index
See previous patch's commit message for rationale.

Change-Id: I6b8cdc045dffccc1c01ed690ff258af09f6ff076
Approved-By: Tom Tromey <tom@tromey.com>
2023-01-31 22:03:40 -05:00
213516ef31 Update copyright year range in header of all files managed by GDB
This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.
2023-01-01 17:01:16 +04:00
758ffab46b Fix crash when creating index from index
My patches yesterday to unify the DWARF index base classes had a bug
-- namely, I did the wholesale dynamic_cast-to-static_cast too hastily
and introduced a crash.  This can be seen by trying to add an index to
a file that has an index, or by running a test like gdb-index-cxx.exp
using the cc-with-debug-names.exp target board.

This patch fixes the crash by introducing a new virtual method and
removing some of the static casts.
2022-05-04 08:38:05 -06:00
f75a1d3a73 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.
2022-04-20 09:10:03 -06:00
6606799fc4 Introduce and use dwarf_scanner_base
This introduces dwarf_scanner_base, a base class for all the index
readers in the DWARF code.  Then, it changes both mapped_index_base
and cooked_index_vector to derive from this new base class.
2022-04-20 09:10:03 -06:00
32ae6b930c Let mapped index classes create the quick_symbol_functions object
This changes the mapped index classes to create the
quick_symbol_functions objects.  This is a step toward having a more
abstract interface to mapped indices.
2022-04-20 09:10:03 -06:00
6555809e3e Give mapped_index_base a virtual destructor
This changes mapped_index_base to have a virtual destructor, so it can
be destroyed via its base class.
2022-04-20 09:10:03 -06:00
20386fa32d Move mapped_index_base to new header file
This moves mapped_index_base and the helper struct name_component to a
new header file in gdb/dwarf2/.
2022-04-20 09:10:03 -06:00