X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FDWARFContext.h;h=746a4639f2772d4e619d2606934100b92812868f;hb=56633441271106376b39a47bbe5b59f85144b64d;hp=1a70f3feef916f32193690c565bd925e1f375605;hpb=72c0d7fdd3d0930c7507060e96aec7d7429a8190;p=oota-llvm.git diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h index 1a70f3feef9..746a4639f27 100644 --- a/lib/DebugInfo/DWARFContext.h +++ b/lib/DebugInfo/DWARFContext.h @@ -11,14 +11,14 @@ #define LLVM_DEBUGINFO_DWARFCONTEXT_H #include "DWARFCompileUnit.h" +#include "DWARFDebugAranges.h" +#include "DWARFDebugLine.h" #include "llvm/DebugInfo/DIContext.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" namespace llvm { -class DWARFDebugAbbrev; - /// DWARFContext /// This data structure is the top level entity that deals with dwarf debug /// information parsing. The actual data is supplied through pure virtual @@ -28,6 +28,8 @@ class DWARFContext : public DIContext { SmallVector CUs; OwningPtr Abbrev; + OwningPtr Aranges; + OwningPtr Line; DWARFContext(DWARFContext &); // = delete DWARFContext &operator=(DWARFContext &); // = delete @@ -51,9 +53,21 @@ 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); + bool isLittleEndian() const { return IsLittleEndian; } virtual StringRef getInfoSection() = 0;