X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FDWARFContext.h;h=b72c119d2534da5ba4a9d5fa5921a4c57e4a0b1a;hb=54543afeba0c7434b74f4f61bb39f12b3779414c;hp=a3bae7927376f685c434707e485a214fb8aeb03a;hpb=a2b15f5079534ed51b1f0bf9158a1b3a5f4ae688;p=oota-llvm.git diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h index a3bae792737..b72c119d253 100644 --- a/lib/DebugInfo/DWARFContext.h +++ b/lib/DebugInfo/DWARFContext.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===/ -#ifndef LLVM_DEBUGINFO_DWARFCONTEXT_H -#define LLVM_DEBUGINFO_DWARFCONTEXT_H +#ifndef LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H +#define LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H #include "DWARFCompileUnit.h" #include "DWARFDebugAranges.h" @@ -42,6 +42,7 @@ class DWARFContext : public DIContext { CUVector DWOCUs; TUVector DWOTUs; std::unique_ptr AbbrevDWO; + std::unique_ptr LocDWO; DWARFContext(DWARFContext &) LLVM_DELETED_FUNCTION; DWARFContext &operator=(DWARFContext &) LLVM_DELETED_FUNCTION; @@ -148,6 +149,9 @@ public: /// Get a pointer to the parsed dwo abbreviations object. const DWARFDebugAbbrev *getDebugAbbrevDWO(); + /// Get a pointer to the parsed DebugLoc object. + const DWARFDebugLocDWO *getDebugLocDWO(); + /// Get a pointer to the parsed DebugAranges object. const DWARFDebugAranges *getDebugAranges(); @@ -155,8 +159,7 @@ public: const DWARFDebugFrame *getDebugFrame(); /// Get a pointer to a parsed line table corresponding to a compile unit. - const DWARFDebugLine::LineTable * - getLineTableForCompileUnit(DWARFCompileUnit *cu); + const DWARFDebugLine::LineTable *getLineTableForUnit(DWARFUnit *cu); DILineInfo getLineInfoForAddress(uint64_t Address, DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; @@ -173,6 +176,7 @@ public: virtual const TypeSectionMap &getTypesSections() = 0; virtual StringRef getAbbrevSection() = 0; virtual const Section &getLocSection() = 0; + virtual const Section &getLocDWOSection() = 0; virtual StringRef getARangeSection() = 0; virtual StringRef getDebugFrameSection() = 0; virtual const Section &getLineSection() = 0; @@ -216,6 +220,7 @@ class DWARFContextInMemory : public DWARFContext { TypeSectionMap TypesSections; StringRef AbbrevSection; Section LocSection; + Section LocDWOSection; StringRef ARangeSection; StringRef DebugFrameSection; Section LineSection; @@ -236,16 +241,17 @@ class DWARFContextInMemory : public DWARFContext { StringRef RangeDWOSection; StringRef AddrSection; - SmallVector, 4> UncompressedSections; + SmallVector, 4> UncompressedSections; public: - DWARFContextInMemory(object::ObjectFile *); + DWARFContextInMemory(object::ObjectFile &); bool isLittleEndian() const override { return IsLittleEndian; } uint8_t getAddressSize() const override { return AddressSize; } const Section &getInfoSection() override { return InfoSection; } const TypeSectionMap &getTypesSections() override { return TypesSections; } StringRef getAbbrevSection() override { return AbbrevSection; } const Section &getLocSection() override { return LocSection; } + const Section &getLocDWOSection() override { return LocDWOSection; } StringRef getARangeSection() override { return ARangeSection; } StringRef getDebugFrameSection() override { return DebugFrameSection; } const Section &getLineSection() override { return LineSection; }