+2021-03-26 Tom Tromey <tom@tromey.com>
+
+ * dwarf2/read.c (dwarf2_read_debug_names)
+ (dwarf2_build_psymtabs_hard, create_addrmap_from_aranges)
+ (dw2_debug_names_iterator::next, create_type_unit_group):
+ Simplify.
+
2021-03-25 Pedro Alves <pedro@palves.net>
* gdb.server/bkpt-other-inferior.exp: Only enable remote output
dwarf2_per_cu_data *,
gdb::hash_enum<sect_offset>>
debug_info_offset_to_per_cu;
- for (dwarf2_per_cu_data *per_cu : per_objfile->per_bfd->all_comp_units)
+ for (dwarf2_per_cu_data *per_cu : per_bfd->all_comp_units)
{
const auto insertpair
= debug_info_offset_to_per_cu.emplace (per_cu->sect_off, per_cu);
dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
if (!read_debug_names_from_section (objfile, objfile_name (objfile),
- &per_objfile->per_bfd->debug_names, *map))
+ &per_bfd->debug_names, *map))
return false;
/* Don't use the index if it's empty. */
per_bfd->debug_names_table = std::move (map);
per_bfd->using_index = 1;
per_bfd->quick_file_names_table =
- create_quick_file_names_table (per_objfile->per_bfd->all_comp_units.size ());
+ create_quick_file_names_table (per_bfd->all_comp_units.size ());
return true;
}
{
case DW_IDX_compile_unit:
/* Don't crash on bad data. */
- if (ull >= m_per_objfile->per_bfd->all_comp_units.size ())
+ if (ull >= per_bfd->all_comp_units.size ())
{
complaint (_(".debug_names entry has bad CU index %s"
" [in module %s]"),
struct dwarf2_per_cu_data *per_cu;
struct type_unit_group *tu_group;
- tu_group = OBSTACK_ZALLOC (&per_objfile->per_bfd->obstack, type_unit_group);
+ tu_group = OBSTACK_ZALLOC (&per_bfd->obstack, type_unit_group);
per_cu = &tu_group->per_cu;
per_cu->per_bfd = per_bfd;
objfile_name (objfile));
scoped_restore restore_reading_psyms
- = make_scoped_restore (&per_objfile->per_bfd->reading_partial_symbols,
- true);
+ = make_scoped_restore (&per_bfd->reading_partial_symbols, true);
per_bfd->info.read (objfile);