LLVM  4.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::DWARFContext Class Referenceabstract

DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing. More...

#include <DWARFContext.h>

Inheritance diagram for llvm::DWARFContext:
[legend]
Collaboration diagram for llvm::DWARFContext:
[legend]

Public Types

typedef DWARFUnitSection
< DWARFCompileUnit >
::iterator_range 
cu_iterator_range
 
typedef DWARFUnitSection
< DWARFTypeUnit >
::iterator_range 
tu_iterator_range
 
typedef iterator_range
< decltype(TUs)::iterator > 
tu_section_iterator_range
 
typedef MapVector
< object::SectionRef,
DWARFSection, std::map
< object::SectionRef, unsigned > > 
TypeSectionMap
 
- Public Types inherited from llvm::DIContext
enum  DIContextKind { CK_DWARF, CK_PDB }
 

Public Member Functions

 DWARFContext ()
 
 DWARFContext (DWARFContext &)=delete
 
DWARFContextoperator= (DWARFContext &)=delete
 
void dump (raw_ostream &OS, DIDumpType DumpType=DIDT_All, bool DumpEH=false, bool SummarizeTypes=false) override
 
cu_iterator_range compile_units ()
 Get compile units in this context. More...
 
tu_section_iterator_range type_unit_sections ()
 Get type units in this context. More...
 
cu_iterator_range dwo_compile_units ()
 Get compile units in the DWO context. More...
 
tu_section_iterator_range dwo_type_unit_sections ()
 Get type units in the DWO context. More...
 
unsigned getNumCompileUnits ()
 Get the number of compile units in this context. More...
 
unsigned getNumTypeUnits ()
 Get the number of compile units in this context. More...
 
unsigned getNumDWOCompileUnits ()
 Get the number of compile units in the DWO context. More...
 
unsigned getNumDWOTypeUnits ()
 Get the number of compile units in the DWO context. More...
 
DWARFCompileUnitgetCompileUnitAtIndex (unsigned index)
 Get the compile unit at the specified index for this compile unit. More...
 
DWARFCompileUnitgetDWOCompileUnitAtIndex (unsigned index)
 Get the compile unit at the specified index for the DWO compile units. More...
 
const DWARFUnitIndexgetCUIndex ()
 
DWARFGdbIndexgetGdbIndex ()
 
const DWARFUnitIndexgetTUIndex ()
 
const DWARFDebugAbbrevgetDebugAbbrev ()
 Get a pointer to the parsed DebugAbbrev object. More...
 
const DWARFDebugLocgetDebugLoc ()
 Get a pointer to the parsed DebugLoc object. More...
 
const DWARFDebugAbbrevgetDebugAbbrevDWO ()
 Get a pointer to the parsed dwo abbreviations object. More...
 
const DWARFDebugLocDWOgetDebugLocDWO ()
 Get a pointer to the parsed DebugLoc object. More...
 
const DWARFDebugArangesgetDebugAranges ()
 Get a pointer to the parsed DebugAranges object. More...
 
const DWARFDebugFramegetDebugFrame ()
 Get a pointer to the parsed frame information object. More...
 
const DWARFDebugFramegetEHFrame ()
 Get a pointer to the parsed eh frame information object. More...
 
const DWARFDebugMacrogetDebugMacro ()
 Get a pointer to the parsed DebugMacro object. More...
 
const DWARFDebugLine::LineTablegetLineTableForUnit (DWARFUnit *cu)
 Get a pointer to a parsed line table corresponding to a compile unit. More...
 
DILineInfo getLineInfoForAddress (uint64_t Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
 
DILineInfoTable getLineInfoForAddressRange (uint64_t Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
 
DIInliningInfo getInliningInfoForAddress (uint64_t Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
 
virtual bool isLittleEndian () const =0
 
virtual uint8_t getAddressSize () const =0
 
virtual const DWARFSectiongetInfoSection ()=0
 
virtual const TypeSectionMapgetTypesSections ()=0
 
virtual StringRef getAbbrevSection ()=0
 
virtual const DWARFSectiongetLocSection ()=0
 
virtual StringRef getARangeSection ()=0
 
virtual StringRef getDebugFrameSection ()=0
 
virtual StringRef getEHFrameSection ()=0
 
virtual const DWARFSectiongetLineSection ()=0
 
virtual StringRef getStringSection ()=0
 
virtual StringRef getRangeSection ()=0
 
virtual StringRef getMacinfoSection ()=0
 
virtual StringRef getPubNamesSection ()=0
 
virtual StringRef getPubTypesSection ()=0
 
virtual StringRef getGnuPubNamesSection ()=0
 
virtual StringRef getGnuPubTypesSection ()=0
 
virtual const DWARFSectiongetInfoDWOSection ()=0
 
virtual const TypeSectionMapgetTypesDWOSections ()=0
 
virtual StringRef getAbbrevDWOSection ()=0
 
virtual const DWARFSectiongetLineDWOSection ()=0
 
virtual const DWARFSectiongetLocDWOSection ()=0
 
virtual StringRef getStringDWOSection ()=0
 
virtual StringRef getStringOffsetDWOSection ()=0
 
virtual StringRef getRangeDWOSection ()=0
 
virtual StringRef getAddrSection ()=0
 
virtual const DWARFSectiongetAppleNamesSection ()=0
 
virtual const DWARFSectiongetAppleTypesSection ()=0
 
virtual const DWARFSectiongetAppleNamespacesSection ()=0
 
virtual const DWARFSectiongetAppleObjCSection ()=0
 
virtual StringRef getCUIndexSection ()=0
 
virtual StringRef getGdbIndexSection ()=0
 
virtual StringRef getTUIndexSection ()=0
 
- Public Member Functions inherited from llvm::DIContext
 DIContext (DIContextKind K)
 
virtual ~DIContext ()=default
 
DIContextKind getKind () const
 

Static Public Member Functions

static bool classof (const DIContext *DICtx)
 
static bool isSupportedVersion (unsigned version)
 

Detailed Description

DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing.

The actual data is supplied through pure virtual methods that a concrete implementation provides.

Definition at line 52 of file DWARFContext.h.

Member Typedef Documentation

Definition at line 99 of file DWARFContext.h.

Definition at line 100 of file DWARFContext.h.

Definition at line 101 of file DWARFContext.h.

Definition at line 205 of file DWARFContext.h.

Constructor & Destructor Documentation

llvm::DWARFContext::DWARFContext ( )
inline

Definition at line 88 of file DWARFContext.h.

llvm::DWARFContext::DWARFContext ( DWARFContext )
delete

Member Function Documentation

static bool llvm::DWARFContext::classof ( const DIContext DICtx)
inlinestatic

Definition at line 92 of file DWARFContext.h.

References llvm::DIContext::CK_DWARF, and llvm::DIContext::getKind().

cu_iterator_range llvm::DWARFContext::compile_units ( )
inline

Get compile units in this context.

Definition at line 104 of file DWARFContext.h.

Referenced by llvm::DWARFDebugAranges::generate().

void DWARFContext::dump ( raw_ostream OS,
DIDumpType  DumpType = DIDT_All,
bool  DumpEH = false,
bool  SummarizeTypes = false 
)
overridevirtual
cu_iterator_range llvm::DWARFContext::dwo_compile_units ( )
inline

Get compile units in the DWO context.

Definition at line 116 of file DWARFContext.h.

tu_section_iterator_range llvm::DWARFContext::dwo_type_unit_sections ( )
inline

Get type units in the DWO context.

Definition at line 122 of file DWARFContext.h.

virtual StringRef llvm::DWARFContext::getAbbrevDWOSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getAbbrevSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual uint8_t llvm::DWARFContext::getAddressSize ( ) const
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getAddrSection ( )
pure virtual
virtual const DWARFSection& llvm::DWARFContext::getAppleNamespacesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const DWARFSection& llvm::DWARFContext::getAppleNamesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const DWARFSection& llvm::DWARFContext::getAppleObjCSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const DWARFSection& llvm::DWARFContext::getAppleTypesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getARangeSection ( )
pure virtual
DWARFCompileUnit* llvm::DWARFContext::getCompileUnitAtIndex ( unsigned  index)
inline

Get the compile unit at the specified index for this compile unit.

Definition at line 152 of file DWARFContext.h.

const DWARFUnitIndex & DWARFContext::getCUIndex ( )

Definition at line 256 of file DWARFContext.cpp.

References llvm::DW_SECT_INFO, and llvm::isLittleEndian().

Referenced by llvm::getDWARFUnitIndex().

virtual StringRef llvm::DWARFContext::getCUIndexSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

const DWARFDebugAbbrev * DWARFContext::getDebugAbbrev ( )

Get a pointer to the parsed DebugAbbrev object.

Definition at line 288 of file DWARFContext.cpp.

References llvm::isLittleEndian().

Referenced by llvm::DWARFUnitSectionBase::parse().

const DWARFDebugAbbrev * DWARFContext::getDebugAbbrevDWO ( )

Get a pointer to the parsed dwo abbreviations object.

Definition at line 299 of file DWARFContext.cpp.

References llvm::isLittleEndian().

Referenced by llvm::DWARFUnitSectionBase::parseDWO().

const DWARFDebugAranges * DWARFContext::getDebugAranges ( )

Get a pointer to the parsed DebugAranges object.

Definition at line 331 of file DWARFContext.cpp.

References llvm::DWARFDebugAranges::generate().

const DWARFDebugFrame * DWARFContext::getDebugFrame ( )

Get a pointer to the parsed frame information object.

Definition at line 340 of file DWARFContext.cpp.

References llvm::isLittleEndian().

virtual StringRef llvm::DWARFContext::getDebugFrameSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

const DWARFDebugLoc * DWARFContext::getDebugLoc ( )

Get a pointer to the parsed DebugLoc object.

Definition at line 309 of file DWARFContext.cpp.

References llvm::isLittleEndian().

const DWARFDebugLocDWO * DWARFContext::getDebugLocDWO ( )

Get a pointer to the parsed DebugLoc object.

Definition at line 321 of file DWARFContext.cpp.

References llvm::isLittleEndian().

const DWARFDebugMacro * DWARFContext::getDebugMacro ( )

Get a pointer to the parsed DebugMacro object.

Definition at line 371 of file DWARFContext.cpp.

References llvm::isLittleEndian(), and llvm::dwarf::syntax::Macro.

DWARFCompileUnit* llvm::DWARFContext::getDWOCompileUnitAtIndex ( unsigned  index)
inline

Get the compile unit at the specified index for the DWO compile units.

Definition at line 158 of file DWARFContext.h.

const DWARFDebugFrame * DWARFContext::getEHFrame ( )

Get a pointer to the parsed eh frame information object.

Definition at line 360 of file DWARFContext.cpp.

References llvm::isLittleEndian().

virtual StringRef llvm::DWARFContext::getEHFrameSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

DWARFGdbIndex & DWARFContext::getGdbIndex ( )

Definition at line 278 of file DWARFContext.cpp.

virtual StringRef llvm::DWARFContext::getGdbIndexSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getGnuPubNamesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getGnuPubTypesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const DWARFSection& llvm::DWARFContext::getInfoDWOSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const DWARFSection& llvm::DWARFContext::getInfoSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

DIInliningInfo DWARFContext::getInliningInfoForAddress ( uint64_t  Address,
DILineInfoSpecifier  Specifier = DILineInfoSpecifier() 
)
overridevirtual
virtual const DWARFSection& llvm::DWARFContext::getLineDWOSection ( )
pure virtual
DILineInfo DWARFContext::getLineInfoForAddress ( uint64_t  Address,
DILineInfoSpecifier  Specifier = DILineInfoSpecifier() 
)
overridevirtual
DILineInfoTable DWARFContext::getLineInfoForAddressRange ( uint64_t  Address,
uint64_t  Size,
DILineInfoSpecifier  Specifier = DILineInfoSpecifier() 
)
overridevirtual
virtual const DWARFSection& llvm::DWARFContext::getLineSection ( )
pure virtual
const DWARFLineTable * DWARFContext::getLineTableForUnit ( DWARFUnit cu)

Get a pointer to a parsed line table corresponding to a compile unit.

Definition at line 382 of file DWARFContext.cpp.

References llvm::DWARFUnit::getAddressByteSize(), llvm::DWARFUnit::getLineSection(), llvm::DWARFUnit::getLineTableOffset(), llvm::DWARFUnit::getUnitDIE(), llvm::isLittleEndian(), and Offset.

virtual const DWARFSection& llvm::DWARFContext::getLocDWOSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const DWARFSection& llvm::DWARFContext::getLocSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getMacinfoSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

unsigned llvm::DWARFContext::getNumCompileUnits ( )
inline

Get the number of compile units in this context.

Definition at line 128 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumDWOCompileUnits ( )
inline

Get the number of compile units in the DWO context.

Definition at line 140 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumDWOTypeUnits ( )
inline

Get the number of compile units in the DWO context.

Definition at line 146 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumTypeUnits ( )
inline

Get the number of compile units in this context.

Definition at line 134 of file DWARFContext.h.

virtual StringRef llvm::DWARFContext::getPubNamesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getPubTypesSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getRangeDWOSection ( )
pure virtual
virtual StringRef llvm::DWARFContext::getRangeSection ( )
pure virtual
virtual StringRef llvm::DWARFContext::getStringDWOSection ( )
pure virtual
virtual StringRef llvm::DWARFContext::getStringOffsetDWOSection ( )
pure virtual
virtual StringRef llvm::DWARFContext::getStringSection ( )
pure virtual
const DWARFUnitIndex & DWARFContext::getTUIndex ( )

Definition at line 267 of file DWARFContext.cpp.

References llvm::DW_SECT_TYPES, and llvm::isLittleEndian().

Referenced by llvm::getDWARFUnitIndex().

virtual StringRef llvm::DWARFContext::getTUIndexSection ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const TypeSectionMap& llvm::DWARFContext::getTypesDWOSections ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual const TypeSectionMap& llvm::DWARFContext::getTypesSections ( )
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual bool llvm::DWARFContext::isLittleEndian ( ) const
pure virtual
static bool llvm::DWARFContext::isSupportedVersion ( unsigned  version)
inlinestatic

Definition at line 239 of file DWARFContext.h.

Referenced by llvm::DWARFUnit::extractImpl().

DWARFContext& llvm::DWARFContext::operator= ( DWARFContext )
delete
tu_section_iterator_range llvm::DWARFContext::type_unit_sections ( )
inline

Get type units in this context.

Definition at line 110 of file DWARFContext.h.


The documentation for this class was generated from the following files: