Lines Matching +full:unit +full:- +full:address

1 //===- DWARFUnit.h ----------------------------------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
52 /// Base class describing the header of any kind of "unit." Some information
53 /// is specific to certain unit types. We separate this class out so we can
54 /// parse the header before deciding what specific kind of unit to construct.
58 // Version, address size, and DWARF format.
73 // Unit type as parsed, or derived from the section kind.
80 /// Parse a unit header from \p debug_info starting at \p offset_ptr.
81 /// Note that \p SectionKind is used as a hint to guess the unit type
82 /// for DWARF formats prior to DWARFv5. In DWARFv5 the unit type is
133 int NumInfoUnits = -1;
161 /// verifier to process unit separately.
162 DWARFUnit *addUnit(std::unique_ptr<DWARFUnit> Unit);
168 return NumInfoUnits == -1 ? size() : NumInfoUnits;
171 unsigned getNumTypesUnits() const { return size() - NumInfoUnits; }
185 /// Represents base address of the CU.
186 /// Represents a unit's contribution to the string offsets table.
222 /// Location table of this unit.
235 /// Start, length, and DWARF format of the unit's contribution to the string
242 /// The compile unit debug information entry items.
245 /// Map from range's start address to end address and corresponding DIE.
247 /// std::map::upper_bound for address range lookup.
251 /// to the end address and the corresponding DIE.
263 /// Return the index of a \p Die entry inside the unit's DIE vector.
266 /// created by this unit. In other word, it's illegal to call this
268 /// children/sibling links starting from this unit's getUnitDIE().
272 return Die - First;
294 /// Find the unit's contribution to the string offsets table and determine its
295 /// length and form. The given offset is expected to be derived from the unit
300 /// Find the unit's contribution to the string offsets table and determine its
302 /// in a dwp file, the start of the unit's contribution to the string offsets
331 /// Size in bytes of the parsed unit header.
345 void setSkeletonUnit(DWARFUnit *SU) { this->SU = SU; }
346 // Returns itself if not using Split DWARF, or if the unit is a skeleton unit
347 // - otherwise returns the split full unit's corresponding skeleton, if
360 /// Returns offset to the indexed address value inside .debug_addr section.
369 /// Recursively update address to Die map.
372 /// Recursively update address to variable Die map.
396 /// Extract the range list referenced by this compile unit from the
398 /// is returned. Successful extraction requires that the compile unit
412 return StringOffsetsTableContribution->getDwarfOffsetByteSize();
417 return StringOffsetsTableContribution->Base;
453 return DWO ? DWO->getUnitDIE(ExtractUnitDIEOnly)
464 /// Return a vector of address ranges resulting from a (possibly encoded)
468 /// Return a vector of address ranges retrieved from an encoded range
485 /// Returns subprogram DIE with address range encompassing the provided
486 /// address. The pointer is alive as long as parsed compile unit DIEs are not
488 DWARFDie getSubroutineForAddress(uint64_t Address);
490 /// Returns variable DIE for the address provided. The pointer is alive as
491 /// long as parsed compile unit DIEs are not cleared.
492 DWARFDie getVariableForAddress(uint64_t Address);
494 /// getInlinedChainForAddress - fetches inlined chain for a given address.
495 /// Returns empty chain if there is no subprogram containing address. The
496 /// chain is valid as long as parsed compile unit DIEs are not cleared.
497 void getInlinedChainForAddress(uint64_t Address,
500 /// Return the DWARFUnitVector containing this unit.
503 /// Returns the number of DIEs in the unit. Parses the unit
510 /// Return the index of a DIE inside the unit's DIE vector.
513 /// created by this unit. In other word, it's illegal to call this
515 /// children/sibling links starting from this unit's getUnitDIE().
532 /// unit's DIE vector.
541 /// unit's DIE vector.
548 if (It != DieArray.end() && It->getOffset() == Offset)
549 return It - DieArray.begin();
555 if (const auto *Contrib = IndexEntry->getContribution(DW_SECT_LINE))
556 return Contrib->getOffset32();
570 /// Size in bytes of the .debug_info data associated with this compile unit.
572 return Header.getLength() + Header.getUnitLengthFieldByteSize() -
576 /// extractDIEsIfNeeded - Parses a compile unit and indexes its DIEs if it
580 /// extractDIEsToVector - Appends all parsed DIEs to a vector.
584 /// clearDIEs - Clear parsed DIEs to keep memory usage low.
587 /// parseDWO - Parses .dwo file for current compile unit. Returns true if
596 return !U->isTypeUnit();