LLVM  5.0.0
Classes | 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 "llvm/DebugInfo/DWARF/DWARFContext.h"

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

Public Types

using cu_iterator_range = DWARFUnitSection< DWARFCompileUnit >::iterator_range
 
using tu_iterator_range = DWARFUnitSection< DWARFTypeUnit >::iterator_range
 
using tu_section_iterator_range = iterator_range< decltype(TUs)::iterator >
 
- Public Types inherited from llvm::DIContext
enum  DIContextKind { CK_DWARF, CK_PDB }
 

Public Member Functions

 DWARFContext ()
 
 DWARFContext (DWARFContext &)=delete
 
DWARFContext & operator= (DWARFContext &)=delete
 
void dump (raw_ostream &OS, DIDumpOptions DumpOpts) override
 
bool verify (raw_ostream &OS, DIDumpType DumpType=DIDT_All) 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...
 
DWARFCompileUnit * getCompileUnitAtIndex (unsigned index)
 Get the compile unit at the specified index for this compile unit. More...
 
DWARFCompileUnit * getDWOCompileUnitAtIndex (unsigned index)
 Get the compile unit at the specified index for the DWO compile units. More...
 
DWARFCompileUnit * getDWOCompileUnitForHash (uint64_t Hash)
 
DWARFDie getDIEForOffset (uint32_t Offset)
 Get a DIE given an exact offset. More...
 
unsigned getMaxVersion () const
 
void setMaxVersionIfGreater (unsigned Version)
 
const DWARFUnitIndex & getCUIndex ()
 
DWARFGdbIndex & getGdbIndex ()
 
const DWARFUnitIndex & getTUIndex ()
 
const DWARFDebugAbbrev * getDebugAbbrev ()
 Get a pointer to the parsed DebugAbbrev object. More...
 
const DWARFDebugLoc * getDebugLoc ()
 Get a pointer to the parsed DebugLoc object. More...
 
const DWARFDebugAbbrev * getDebugAbbrevDWO ()
 Get a pointer to the parsed dwo abbreviations object. More...
 
const DWARFDebugLocDWO * getDebugLocDWO ()
 Get a pointer to the parsed DebugLoc object. More...
 
const DWARFDebugAranges * getDebugAranges ()
 Get a pointer to the parsed DebugAranges object. More...
 
const DWARFDebugFrame * getDebugFrame ()
 Get a pointer to the parsed frame information object. More...
 
const DWARFDebugFrame * getEHFrame ()
 Get a pointer to the parsed eh frame information object. More...
 
const DWARFDebugMacro * getDebugMacro ()
 Get a pointer to the parsed DebugMacro object. More...
 
const DWARFDebugLine::LineTable * getLineTableForUnit (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 StringRef getFileName () const =0
 
virtual bool isLittleEndian () const =0
 
virtual uint8_t getAddressSize () const =0
 
virtual const DWARFSection & getInfoSection ()=0
 
virtual void forEachTypesSections (function_ref< void(DWARFSection &)> F)=0
 
virtual StringRef getAbbrevSection ()=0
 
virtual const DWARFSection & getLocSection ()=0
 
virtual StringRef getARangeSection ()=0
 
virtual StringRef getDebugFrameSection ()=0
 
virtual StringRef getEHFrameSection ()=0
 
virtual const DWARFSection & getLineSection ()=0
 
virtual StringRef getStringSection ()=0
 
virtual const DWARFSection & getRangeSection ()=0
 
virtual StringRef getMacinfoSection ()=0
 
virtual StringRef getPubNamesSection ()=0
 
virtual StringRef getPubTypesSection ()=0
 
virtual StringRef getGnuPubNamesSection ()=0
 
virtual StringRef getGnuPubTypesSection ()=0
 
virtual const DWARFSection & getInfoDWOSection ()=0
 
virtual void forEachTypesDWOSections (function_ref< void(DWARFSection &)> F)=0
 
virtual StringRef getAbbrevDWOSection ()=0
 
virtual const DWARFSection & getLineDWOSection ()=0
 
virtual const DWARFSection & getLocDWOSection ()=0
 
virtual StringRef getStringDWOSection ()=0
 
virtual const DWARFSection & getStringOffsetDWOSection ()=0
 
virtual const DWARFSection & getRangeDWOSection ()=0
 
virtual const DWARFSection & getAddrSection ()=0
 
virtual const DWARFSection & getAppleNamesSection ()=0
 
virtual const DWARFSection & getAppleTypesSection ()=0
 
virtual const DWARFSection & getAppleNamespacesSection ()=0
 
virtual const DWARFSection & getAppleObjCSection ()=0
 
virtual StringRef getCUIndexSection ()=0
 
virtual StringRef getGdbIndexSection ()=0
 
virtual StringRef getTUIndexSection ()=0
 
std::shared_ptr< DWARFContext > getDWOContext (StringRef AbsolutePath)
 
virtual const DWARFSection & getStringOffsetSection ()=0
 DWARF v5. More...
 
- 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 111 of file DWARFContext.h.

Definition at line 112 of file DWARFContext.h.

Definition at line 113 of file DWARFContext.h.

Constructor & Destructor Documentation

llvm::DWARFContext::DWARFContext ( )
inline

Definition at line 99 of file DWARFContext.h.

llvm::DWARFContext::DWARFContext ( DWARFContext &  )
delete

Member Function Documentation

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

Definition at line 103 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 116 of file DWARFContext.h.

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

void DWARFContext::dump ( raw_ostream &  OS,
DIDumpOptions  DumpOpts 
)
overridevirtual
cu_iterator_range llvm::DWARFContext::dwo_compile_units ( )
inline

Get compile units in the DWO context.

Definition at line 128 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 134 of file DWARFContext.h.

virtual void llvm::DWARFContext::forEachTypesDWOSections ( function_ref< void(DWARFSection &)>  F)
pure virtual

Implemented in llvm::DWARFContextInMemory.

virtual void llvm::DWARFContext::forEachTypesSections ( function_ref< void(DWARFSection &)>  F)
pure virtual

Implemented in llvm::DWARFContextInMemory.

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 const DWARFSection& 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 164 of file DWARFContext.h.

const DWARFUnitIndex & DWARFContext::getCUIndex ( )

Definition at line 432 of file DWARFContext.cpp.

References llvm::DW_SECT_INFO.

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 464 of file DWARFContext.cpp.

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

const DWARFDebugAbbrev * DWARFContext::getDebugAbbrevDWO ( )

Get a pointer to the parsed dwo abbreviations object.

Definition at line 475 of file DWARFContext.cpp.

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

const DWARFDebugAranges * DWARFContext::getDebugAranges ( )

Get a pointer to the parsed DebugAranges object.

Definition at line 509 of file DWARFContext.cpp.

References llvm::DWARFDebugAranges::generate().

const DWARFDebugFrame * DWARFContext::getDebugFrame ( )

Get a pointer to the parsed frame information object.

Definition at line 518 of file DWARFContext.cpp.

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 485 of file DWARFContext.cpp.

const DWARFDebugLocDWO * DWARFContext::getDebugLocDWO ( )

Get a pointer to the parsed DebugLoc object.

Definition at line 499 of file DWARFContext.cpp.

References llvm::Data.

const DWARFDebugMacro * DWARFContext::getDebugMacro ( )

Get a pointer to the parsed DebugMacro object.

Definition at line 549 of file DWARFContext.cpp.

References llvm::dwarf::syntax::Macro.

DWARFDie DWARFContext::getDIEForOffset ( uint32_t  Offset)

Get a DIE given an exact offset.

Definition at line 407 of file DWARFContext.cpp.

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

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

Definition at line 170 of file DWARFContext.h.

DWARFCompileUnit * DWARFContext::getDWOCompileUnitForHash ( uint64_t  Hash)

Definition at line 398 of file DWARFContext.cpp.

References fuzzer::Hash().

std::shared_ptr< DWARFContext > DWARFContext::getDWOContext ( StringRef  AbsolutePath)
const DWARFDebugFrame * DWARFContext::getEHFrame ( )

Get a pointer to the parsed eh frame information object.

Definition at line 538 of file DWARFContext.cpp.

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

Implemented in llvm::DWARFContextInMemory.

virtual StringRef llvm::DWARFContext::getFileName ( ) const
pure virtual

Implemented in llvm::DWARFContextInMemory.

DWARFGdbIndex & DWARFContext::getGdbIndex ( )

Definition at line 454 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)
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::getMaxVersion ( ) const
inline

Definition at line 180 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumCompileUnits ( )
inline

Get the number of compile units in this context.

Definition at line 140 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumDWOCompileUnits ( )
inline

Get the number of compile units in the DWO context.

Definition at line 152 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumDWOTypeUnits ( )
inline

Get the number of compile units in the DWO context.

Definition at line 158 of file DWARFContext.h.

unsigned llvm::DWARFContext::getNumTypeUnits ( )
inline

Get the number of compile units in this context.

Definition at line 146 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 const DWARFSection& llvm::DWARFContext::getRangeDWOSection ( )
pure virtual
virtual const DWARFSection& llvm::DWARFContext::getRangeSection ( )
pure virtual
virtual StringRef llvm::DWARFContext::getStringDWOSection ( )
pure virtual
virtual const DWARFSection& llvm::DWARFContext::getStringOffsetDWOSection ( )
pure virtual
virtual const DWARFSection& llvm::DWARFContext::getStringOffsetSection ( )
pure virtual

DWARF v5.

Implemented in llvm::DWARFContextInMemory.

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

virtual StringRef llvm::DWARFContext::getStringSection ( )
pure virtual
const DWARFUnitIndex & DWARFContext::getTUIndex ( )

Definition at line 443 of file DWARFContext.cpp.

References llvm::DW_SECT_TYPES.

Referenced by llvm::getDWARFUnitIndex().

virtual StringRef llvm::DWARFContext::getTUIndexSection ( )
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 268 of file DWARFContext.h.

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

DWARFContext& llvm::DWARFContext::operator= ( DWARFContext &  )
delete
void llvm::DWARFContext::setMaxVersionIfGreater ( unsigned  Version)
inline

Definition at line 182 of file DWARFContext.h.

References llvm::IndexedInstrProf::Version.

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

tu_section_iterator_range llvm::DWARFContext::type_unit_sections ( )
inline

Get type units in this context.

Definition at line 122 of file DWARFContext.h.

bool DWARFContext::verify ( raw_ostream &  OS,
DIDumpType  DumpType = DIDT_All 
)
overridevirtual

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