-};
-
-/* Persistent data held for a compilation unit, even when not
- processing it. We put a pointer to this structure in the
- read_symtab_private field of the psymtab. */
-
-struct dwarf2_per_cu_data
-{
- /* The start offset and length of this compilation unit.
- NOTE: Unlike comp_unit_head.length, this length includes
- initial_length_size.
- If the DIE refers to a DWO file, this is always of the original die,
- not the DWO file. */
- sect_offset sect_off;
- unsigned int length;
-
- /* DWARF standard version this data has been read from (such as 4 or 5). */
- short dwarf_version;
-
- /* Flag indicating this compilation unit will be read in before
- any of the current compilation units are processed. */
- unsigned int queued : 1;
-
- /* This flag will be set when reading partial DIEs if we need to load
- absolutely all DIEs for this compilation unit, instead of just the ones
- we think are interesting. It gets set if we look for a DIE in the
- hash table and don't find it. */
- unsigned int load_all_dies : 1;
-
- /* Non-zero if this CU is from .debug_types.
- Struct dwarf2_per_cu_data is contained in struct signatured_type iff
- this is non-zero. */
- unsigned int is_debug_types : 1;
-
- /* Non-zero if this CU is from the .dwz file. */
- unsigned int is_dwz : 1;
-
- /* Non-zero if reading a TU directly from a DWO file, bypassing the stub.
- This flag is only valid if is_debug_types is true.
- We can't read a CU directly from a DWO file: There are required
- attributes in the stub. */
- unsigned int reading_dwo_directly : 1;
-
- /* Non-zero if the TU has been read.
- This is used to assist the "Stay in DWO Optimization" for Fission:
- When reading a DWO, it's faster to read TUs from the DWO instead of
- fetching them from random other DWOs (due to comdat folding).
- If the TU has already been read, the optimization is unnecessary
- (and unwise - we don't want to change where gdb thinks the TU lives
- "midflight").
- This flag is only valid if is_debug_types is true. */
- unsigned int tu_read : 1;
-
- /* 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 *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. This is left as NULL for
- dummy CUs (a CU header, but nothing else). */
- struct dwarf2_cu *cu;
-
- /* The corresponding objfile.
- Normally we can get the objfile from dwarf2_per_objfile.
- However we can enter this file with just a "per_cu" handle. */
- struct objfile *objfile;
-
- /* When dwarf2_per_objfile->using_index is true, the 'quick' field
- is active. Otherwise, the 'psymtab' field is active. */
- union
- {
- /* The partial symbol table associated with this compilation unit,
- or NULL for unread partial units. */
- struct partial_symtab *psymtab;
-
- /* Data needed by the "quick" functions. */
- struct dwarf2_per_cu_quick_data *quick;
- } v;
-
- /* The CUs we import using DW_TAG_imported_unit. This is filled in
- while reading psymtabs, used to compute the psymtab dependencies,
- and then cleared. Then it is filled in again while reading full
- symbols, and only deleted when the objfile is destroyed.
-
- This is also used to work around a difference between the way gold
- generates .gdb_index version <=7 and the way gdb does. Arguably this
- is a gold bug. For symbols coming from TUs, gold records in the index
- the CU that includes the TU instead of the TU itself. This breaks
- dw2_lookup_symbol: It assumes that if the index says symbol X lives
- in CU/TU Y, then one need only expand Y and a subsequent lookup in Y
- will find X. Alas TUs live in their own symtab, so after expanding CU Y
- we need to look in TU Z to find X. Fortunately, this is akin to
- DW_TAG_imported_unit, so we just use the same mechanism: For
- .gdb_index version <=7 this also records the TUs that the CU referred
- to. Concurrently with this change gdb was modified to emit version 8
- indices so we only pay a price for gold generated indices.
- http://sourceware.org/bugzilla/show_bug.cgi?id=15021. */
- VEC (dwarf2_per_cu_ptr) *imported_symtabs;
-};
-
-/* Entry in the signatured_types hash table. */
-
-struct signatured_type
-{
- /* The "per_cu" object of this type.
- This struct is used iff per_cu.is_debug_types.
- N.B.: This is the first member so that it's easy to convert pointers
- between them. */
- struct dwarf2_per_cu_data per_cu;
-
- /* The type's signature. */
- ULONGEST signature;
-
- /* Offset in the TU of the type's DIE, as read from the TU header.
- If this TU is a DWO stub and the definition lives in a DWO file
- (specified by DW_AT_GNU_dwo_name), this value is unusable. */
- cu_offset type_offset_in_tu;
-
- /* Offset in the section of the type's DIE.
- If the definition lives in a DWO file, this is the offset in the
- .debug_types.dwo section.
- The value is zero until the actual value is known.
- Zero is otherwise not a valid section offset. */
- sect_offset type_offset_in_section;