X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FDWARFContext.h;h=e55a27e6984087181307447363c4a7430ce5f314;hb=fd34c110cf34b0d0734922330dd8d9dbf827e7fa;hp=3eca9524b5940bc390046ffb96f5780934a5fd12;hpb=358f4fd9ee078b3c79597fc688855fb48bc1f356;p=oota-llvm.git diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h index 3eca9524b59..e55a27e6984 100644 --- a/lib/DebugInfo/DWARFContext.h +++ b/lib/DebugInfo/DWARFContext.h @@ -12,6 +12,7 @@ #include "DWARFCompileUnit.h" #include "DWARFDebugAranges.h" +#include "DWARFDebugLine.h" #include "llvm/DebugInfo/DIContext.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" @@ -28,6 +29,7 @@ class DWARFContext : public DIContext { SmallVector CUs; OwningPtr Abbrev; OwningPtr Aranges; + OwningPtr Line; DWARFContext(DWARFContext &); // = delete DWARFContext &operator=(DWARFContext &); // = delete @@ -51,12 +53,22 @@ public: return &CUs[index]; } + /// Return the compile unit that includes an offset (relative to .debug_info). + DWARFCompileUnit *getCompileUnitForOffset(uint32_t offset); + /// Get a pointer to the parsed DebugAbbrev object. const DWARFDebugAbbrev *getDebugAbbrev(); /// Get a pointer to the parsed DebugAranges object. const DWARFDebugAranges *getDebugAranges(); + /// Get a pointer to a parsed line table corresponding to a compile unit. + const DWARFDebugLine::LineTable * + getLineTableForCompileUnit(DWARFCompileUnit *cu); + + virtual DILineInfo getLineInfoForAddress(uint64_t address, + DILineInfoSpecifier specifier = DILineInfoSpecifier()); + bool isLittleEndian() const { return IsLittleEndian; } virtual StringRef getInfoSection() = 0; @@ -75,6 +87,7 @@ public: /// DWARFContext. It assumes all content is available in memory and stores /// pointers to it. class DWARFContextInMemory : public DWARFContext { + virtual void anchor(); StringRef InfoSection; StringRef AbbrevSection; StringRef ARangeSection;