do_cleanups (cleanups);
}
-/* Read CU/TU THIS_CU in section SECTION,
- but do not follow DW_AT_GNU_dwo_name if present.
- DWOP_FILE, if non-NULL, is the DWO/DWP file to read (the caller is assumed
- to have already done the lookup to find the DWO/DWP file).
+/* Read CU/TU THIS_CU but do not follow DW_AT_GNU_dwo_name if present.
+ DWO_FILE, if non-NULL, is the DWO file to read (the caller is assumed
+ to have already done the lookup to find the DWO file).
The caller is required to fill in THIS_CU->section, THIS_CU->offset, and
THIS_CU->is_debug_types, but nothing else.
static void
init_cutu_and_read_dies_no_follow (struct dwarf2_per_cu_data *this_cu,
- struct dwarf2_section_info *abbrev_section,
struct dwo_file *dwo_file,
die_reader_func_ftype *die_reader_func,
void *data)
struct objfile *objfile = dwarf2_per_objfile->objfile;
struct dwarf2_section_info *section = this_cu->section;
bfd *abfd = get_section_bfd_owner (section);
+ struct dwarf2_section_info *abbrev_section;
struct dwarf2_cu cu;
const gdb_byte *begin_info_ptr, *info_ptr;
struct die_reader_specs reader;
gdb_assert (this_cu->cu == NULL);
+ abbrev_section = (dwo_file != NULL
+ ? &dwo_file->sections.abbrev
+ : get_abbrev_section_for_cu (this_cu));
+
/* This is cheap if the section is already read in. */
dwarf2_read_section (objfile, section);
die_reader_func_ftype *die_reader_func,
void *data)
{
- init_cutu_and_read_dies_no_follow (this_cu,
- get_abbrev_section_for_cu (this_cu),
- NULL,
- die_reader_func, data);
+ init_cutu_and_read_dies_no_follow (this_cu, NULL, die_reader_func, data);
}
\f
/* Type Unit Groups.
per_cu.offset.sect_off = info_ptr - section->buffer;
per_cu.section = section;
- init_cutu_and_read_dies_no_follow (&per_cu,
- &dwo_file->sections.abbrev,
- dwo_file,
+ init_cutu_and_read_dies_no_follow (&per_cu, dwo_file,
create_dwo_cu_reader,
&create_dwo_cu_data);