10 #ifndef LLVM_DEBUGINFO_DWARFUNIT_H
11 #define LLVM_DEBUGINFO_DWARFUNIT_H
26 class DWARFDebugAbbrev;
35 uint32_t RangeSectionBase;
39 uint32_t AddrOffsetSectionBase;
50 std::vector<DWARFDebugInfoEntryMinimal> DieArray;
58 DWARFUnit *getUnit()
const {
return DWOU; }
76 AddrOffsetSection = AOS;
77 AddrOffsetSectionBase = Base;
81 RangeSectionBase = Base;
107 virtual uint32_t
getSize()
const {
return 11; }
121 BaseAddr = base_addr;
126 extractDIEsIfNeeded(extract_cu_die_only);
127 return DieArray.empty() ? NULL : &DieArray[0];
134 bool clear_dies_if_already_not_parsed,
135 uint32_t CUOffsetInAranges);
145 size_t extractDIEsIfNeeded(
bool CUDieOnly);
147 void extractDIEsToVector(
bool AppendCUDie,
bool AppendNonCUDIEs,
148 std::vector<DWARFDebugInfoEntryMinimal> &DIEs)
const;
152 void setDIERelations();
154 void clearDIEs(
bool KeepCUDie);
void setBaseAddress(uint64_t base_addr)
uint64_t getBaseAddress() const
const DWARFDebugInfoEntryMinimal * getCompileUnitDIE(bool extract_cu_die_only=true)
StringRef getStringOffsetSection() const
bool extractRangeList(uint32_t RangeListOffset, DWARFDebugRangeList &RangeList) const
uint32_t getNextUnitOffset() const
bool getStringOffsetSectionItem(uint32_t Index, uint32_t &Result) const
const DWARFAbbreviationDeclarationSet * getAbbreviations() const
uint32_t getLength() const
const char * getCompilationDir()
uint32_t getFirstDIEOffset() const
DWARFDebugInfoEntryInlinedChain getInlinedChainForAddress(uint64_t Address)
uint16_t getVersion() const
DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data.
StringRef getStringSection() const
void setRangesSection(StringRef RS, uint32_t Base)
void buildAddressRangeTable(DWARFDebugAranges *debug_aranges, bool clear_dies_if_already_not_parsed, uint32_t CUOffsetInAranges)
const RelocAddrMap * getRelocMap() const
virtual uint32_t getSize() const
Size in bytes of the compile unit header.
DataExtractor getStringExtractor() const
bool extract(DataExtractor debug_info, uint32_t *offset_ptr)
size_t getDebugInfoSize() const
Size in bytes of the .debug_info data associated with this compile unit.
bool getAddrOffsetSectionItem(uint32_t Index, uint64_t &Result) const
DataExtractor getDebugInfoExtractor() const
virtual bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr)
uint32_t getOffset() const
uint8_t getAddressByteSize() const
DWARFUnit(const DWARFDebugAbbrev *DA, StringRef IS, StringRef AS, StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, const RelocAddrMap *M, bool LE)
void setAddrOffsetSection(StringRef AOS, uint32_t Base)