/* The section this CU/TU lives in.
If the DIE refers to a DWO file, this is always the original die,
not the DWO file. */
- struct dwarf2_section_info *info_or_types_section;
+ struct dwarf2_section_info *section;
/* Set to non-NULL iff this CU is currently loaded. When it gets freed out
of the CU cache it gets reset to NULL again. */
type units using this stmt_list so that the rest of the code still has
a "per_cu" handle on the symtab.
This PER_CU is recognized by having no section. */
-#define IS_TYPE_UNIT_GROUP(per_cu) ((per_cu)->info_or_types_section == NULL)
+#define IS_TYPE_UNIT_GROUP(per_cu) ((per_cu)->section == NULL)
struct dwarf2_per_cu_data per_cu;
union
ULONGEST signature;
/* The section this CU/TU lives in, in the DWO file. */
- struct dwarf2_section_info *info_or_types_section;
+ struct dwarf2_section_info *section;
/* Same as dwarf2_per_cu_data:{offset,length} but for the DWO section. */
sect_offset offset;
struct dwarf2_section_info macro;
struct dwarf2_section_info str_offsets;
/* Each DWP hash table entry records one CU or one TU.
- That is recorded here, and copied to dwo_unit.info_or_types_section. */
+ That is recorded here, and copied to dwo_unit.section. */
struct dwarf2_section_info info_or_types;
};
the_cu->offset.sect_off = offset;
the_cu->length = length;
the_cu->objfile = objfile;
- the_cu->info_or_types_section = section;
+ the_cu->section = section;
the_cu->v.quick = OBSTACK_ZALLOC (&objfile->objfile_obstack,
struct dwarf2_per_cu_quick_data);
the_cu->is_dwz = is_dwz;
sig_type->signature = signature;
sig_type->type_offset_in_tu.cu_off = type_offset_in_tu;
sig_type->per_cu.is_debug_types = 1;
- sig_type->per_cu.info_or_types_section = section;
+ sig_type->per_cu.section = section;
sig_type->per_cu.offset.sect_off = offset;
sig_type->per_cu.objfile = objfile;
sig_type->per_cu.v.quick
dwo_tu->dwo_file = dwo_file;
dwo_tu->signature = signature;
dwo_tu->type_offset_in_tu = type_offset_in_tu;
- dwo_tu->info_or_types_section = section;
+ dwo_tu->section = section;
dwo_tu->offset = offset;
dwo_tu->length = length;
}
sig_type->type_offset_in_tu = type_offset_in_tu;
sig_type->per_cu.objfile = objfile;
sig_type->per_cu.is_debug_types = 1;
- sig_type->per_cu.info_or_types_section = section;
+ sig_type->per_cu.section = section;
sig_type->per_cu.offset = offset;
sig_type->per_cu.length = length;
}
void *data)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct dwarf2_section_info *section = this_cu->info_or_types_section;
+ struct dwarf2_section_info *section = this_cu->section;
bfd *abfd = section->asection->owner;
struct dwarf2_cu *cu;
gdb_byte *begin_info_ptr, *info_ptr;
/* Set up for reading the DWO CU/TU. */
cu->dwo_unit = dwo_unit;
- section = dwo_unit->info_or_types_section;
+ section = dwo_unit->section;
dwarf2_read_section (objfile, section);
begin_info_ptr = info_ptr = section->buffer + dwo_unit->offset.sect_off;
dwo_abbrev_section = &dwo_unit->dwo_file->sections.abbrev;
void *data)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
- struct dwarf2_section_info *section = this_cu->info_or_types_section;
+ struct dwarf2_section_info *section = this_cu->section;
bfd *abfd = section->asection->owner;
struct dwarf2_cu cu;
gdb_byte *begin_info_ptr, *info_ptr;
sorted_by_abbrev[i].sig_type = sig_type;
sorted_by_abbrev[i].abbrev_offset =
- read_abbrev_offset (sig_type->per_cu.info_or_types_section,
+ read_abbrev_offset (sig_type->per_cu.section,
sig_type->per_cu.offset);
}
cleanups = make_cleanup (xfree, sorted_by_abbrev);
this_cu->length = length + initial_length_size;
this_cu->is_dwz = is_dwz;
this_cu->objfile = objfile;
- this_cu->info_or_types_section = section;
+ this_cu->section = section;
if (*n_comp_units == *n_allocated)
{
struct dwarf2_cu *cu = reader->cu;
struct objfile *objfile = dwarf2_per_objfile->objfile;
sect_offset offset = cu->per_cu->offset;
- struct dwarf2_section_info *section = cu->per_cu->info_or_types_section;
+ struct dwarf2_section_info *section = cu->per_cu->section;
struct create_dwo_info_table_data *data = datap;
struct dwo_file *dwo_file = data->dwo_file;
htab_t cu_htab = data->cu_htab;
dwo_unit = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_unit);
dwo_unit->dwo_file = dwo_file;
dwo_unit->signature = DW_UNSND (attr);
- dwo_unit->info_or_types_section = section;
+ dwo_unit->section = section;
dwo_unit->offset = offset;
dwo_unit->length = cu->per_cu->length;
per_cu.objfile = objfile;
per_cu.is_debug_types = 0;
per_cu.offset.sect_off = info_ptr - section->buffer;
- per_cu.info_or_types_section = section;
+ per_cu.section = section;
init_cutu_and_read_dies_no_follow (&per_cu,
&dwo_file->sections.abbrev,
dwo_unit = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_unit);
dwo_unit->dwo_file = dwo_file;
dwo_unit->signature = signature;
- dwo_unit->info_or_types_section =
- obstack_alloc (&objfile->objfile_obstack,
- sizeof (struct dwarf2_section_info));
- *dwo_unit->info_or_types_section = sections.info_or_types;
+ dwo_unit->section = obstack_alloc (&objfile->objfile_obstack,
+ sizeof (struct dwarf2_section_info));
+ *dwo_unit->section = sections.info_or_types;
/* offset, length, type_offset_in_tu are set later. */
return dwo_unit;
sig_type
= lookup_signatured_type_at_offset (dwarf2_per_objfile->objfile,
- cu->per_cu->info_or_types_section,
+ cu->per_cu->section,
cu->per_cu->offset);
gdb_assert (sig_type->type_offset_in_section.sect_off != 0);
if (sig_type->type_offset_in_section.sect_off != die->offset.sect_off)
if (per_cu->cu)
return &per_cu->cu->header;
- info_ptr = per_cu->info_or_types_section->buffer + per_cu->offset.sect_off;
+ info_ptr = per_cu->section->buffer + per_cu->offset.sect_off;
memset (cu_headerp, 0, sizeof (*cu_headerp));
read_comp_unit_head (cu_headerp, info_ptr, per_cu->objfile->obfd);