/* Find an abbrev table coming from the abbrev section SECTION at
offset OFFSET. Return the table, or nullptr if it has not yet
been registered. */
- abbrev_table *find (struct dwarf2_section_info *section, sect_offset offset)
+ const abbrev_table *find (dwarf2_section_info *section,
+ sect_offset offset) const
{
search_key key = { section, offset };
DISABLE_COPY_AND_ASSIGN (cooked_index_storage);
/* Return the current abbrev table_cache. */
- abbrev_table_cache *get_abbrev_table_cache ()
+ const abbrev_table_cache *get_abbrev_table_cache () const
{ return &m_abbrev_table_cache; }
/* Return the DIE reader corresponding to PER_CU. If no such reader
const gdb_byte *buffer_end;
/* The abbreviation table to use when reading the DIEs. */
- struct abbrev_table *abbrev_table;
+ const struct abbrev_table *abbrev_table;
};
/* A subclass of die_reader_specs that holds storage and has complex
cutu_reader (dwarf2_per_cu_data *this_cu,
dwarf2_per_objfile *per_objfile,
- struct abbrev_table *abbrev_table,
+ const struct abbrev_table *abbrev_table,
dwarf2_cu *existing_cu,
bool skip_partial,
- abbrev_table_cache *cache = nullptr);
+ const abbrev_table_cache *cache = nullptr);
explicit cutu_reader (struct dwarf2_per_cu_data *this_cu,
dwarf2_per_objfile *per_objfile,
struct dwarf2_cu *cu,
struct dwarf2_section_info *section,
struct dwo_file *dwo_file,
- struct abbrev_table *abbrev_table)
+ const abbrev_table *abbrev_table)
{
gdb_assert (section->readin && section->buffer != NULL);
reader->abfd = section->get_bfd_owner ();
cutu_reader::cutu_reader (dwarf2_per_cu_data *this_cu,
dwarf2_per_objfile *per_objfile,
- struct abbrev_table *abbrev_table,
+ const struct abbrev_table *abbrev_table,
dwarf2_cu *existing_cu,
bool skip_partial,
- abbrev_table_cache *cache)
+ const abbrev_table_cache *cache)
: die_reader_specs {},
m_this_cu (this_cu)
{