dwarf2read.c:mapped_index, use gdb::array_view, simplify symbol table
authorPedro Alves <palves@redhat.com>
Fri, 8 Dec 2017 22:44:13 +0000 (22:44 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 8 Dec 2017 23:37:42 +0000 (23:37 +0000)
commitf00a2de2a7556c59bce93f7ced44afa8e1bbf7c3
tree20d64da5f95974a7d3fa5b14fdb1cced4ec26537
parent927aa2e778dce440f4de5de8fc37ead1683a804e
dwarf2read.c:mapped_index, use gdb::array_view, simplify symbol table

This replaces a couple ptr+size pairs with gdb::array_view in the
.gdb_index code, and simplifies things by using an aggregate for the
type of the symbol table hash bucket instead of having to consider the
distinction between size of table vs number of slots and access name
vs vec by index.

gdb/ChangeLog:
2017-12-08  Pedro Alves  <palves@redhat.com>

* dwarf2read.c (mapped_index::symbol_table_slot): New.
(mapped_index::address_table): Now a gdb::array_view of const
gdb_byte.
(mapped_index::symbol_table): Now a gdb::array_view of
symbol_table_slot.
(mapped_index::address_table_size)
(mapped_index::symbol_table_slots): Delete.
(create_addrmap_from_index): Adjust.
(find_slot_in_mapped_hash): Adjust.
(read_index_from_section): Adjust.
(dwarf2_read_index): Adjust.
gdb/ChangeLog
gdb/dwarf2read.c