LLVM API Documentation
#include <DWARFContext.h>
Classes | |
struct | Section |
Public Types | |
typedef DWARFUnitSection < DWARFCompileUnit > ::iterator_range | cu_iterator_range |
typedef DWARFUnitSection < DWARFTypeUnit > ::iterator_range | tu_iterator_range |
typedef MapVector < object::SectionRef, Section, std::map< object::SectionRef, unsigned > > | TypeSectionMap |
Public Member Functions | |
DWARFContext () | |
void | dump (raw_ostream &OS, DIDumpType DumpType=DIDT_All) override |
cu_iterator_range | compile_units () |
Get compile units in this context. | |
tu_iterator_range | type_units () |
Get type units in this context. | |
cu_iterator_range | dwo_compile_units () |
Get compile units in the DWO context. | |
tu_iterator_range | dwo_type_units () |
Get type units in the DWO context. | |
unsigned | getNumCompileUnits () |
Get the number of compile units in this context. | |
unsigned | getNumTypeUnits () |
Get the number of compile units in this context. | |
unsigned | getNumDWOCompileUnits () |
Get the number of compile units in the DWO context. | |
unsigned | getNumDWOTypeUnits () |
Get the number of compile units in the DWO context. | |
DWARFCompileUnit * | getCompileUnitAtIndex (unsigned index) |
Get the compile unit at the specified index for this compile unit. | |
DWARFCompileUnit * | getDWOCompileUnitAtIndex (unsigned index) |
Get the compile unit at the specified index for the DWO compile units. | |
const DWARFDebugAbbrev * | getDebugAbbrev () |
Get a pointer to the parsed DebugAbbrev object. | |
const DWARFDebugLoc * | getDebugLoc () |
Get a pointer to the parsed DebugLoc object. | |
const DWARFDebugAbbrev * | getDebugAbbrevDWO () |
Get a pointer to the parsed dwo abbreviations object. | |
const DWARFDebugLocDWO * | getDebugLocDWO () |
Get a pointer to the parsed DebugLoc object. | |
const DWARFDebugAranges * | getDebugAranges () |
Get a pointer to the parsed DebugAranges object. | |
const DWARFDebugFrame * | getDebugFrame () |
Get a pointer to the parsed frame information object. | |
const DWARFDebugLine::LineTable * | getLineTableForUnit (DWARFUnit *cu) |
Get a pointer to a parsed line table corresponding to a compile unit. | |
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 Section & | getInfoSection ()=0 |
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 |
virtual const Section & | getLineDWOSection ()=0 |
virtual StringRef | getStringSection ()=0 |
virtual StringRef | getRangeSection ()=0 |
virtual StringRef | getPubNamesSection ()=0 |
virtual StringRef | getPubTypesSection ()=0 |
virtual StringRef | getGnuPubNamesSection ()=0 |
virtual StringRef | getGnuPubTypesSection ()=0 |
virtual const Section & | getInfoDWOSection ()=0 |
virtual const TypeSectionMap & | getTypesDWOSections ()=0 |
virtual StringRef | getAbbrevDWOSection ()=0 |
virtual StringRef | getStringDWOSection ()=0 |
virtual StringRef | getStringOffsetDWOSection ()=0 |
virtual StringRef | getRangeDWOSection ()=0 |
virtual StringRef | getAddrSection ()=0 |
Static Public Member Functions | |
static bool | classof (const DIContext *DICtx) |
static bool | isSupportedVersion (unsigned version) |
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 30 of file DWARFContext.h.
typedef DWARFUnitSection<DWARFCompileUnit>::iterator_range llvm::DWARFContext::cu_iterator_range |
Definition at line 78 of file DWARFContext.h.
typedef DWARFUnitSection<DWARFTypeUnit>::iterator_range llvm::DWARFContext::tu_iterator_range |
Definition at line 79 of file DWARFContext.h.
typedef MapVector<object::SectionRef, Section, std::map<object::SectionRef, unsigned> > llvm::DWARFContext::TypeSectionMap |
Definition at line 173 of file DWARFContext.h.
llvm::DWARFContext::DWARFContext | ( | ) | [inline] |
Definition at line 70 of file DWARFContext.h.
static bool llvm::DWARFContext::classof | ( | const DIContext * | DICtx | ) | [inline, static] |
Definition at line 72 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 82 of file DWARFContext.h.
Referenced by llvm::DWARFDebugAranges::generate().
void DWARFContext::dump | ( | raw_ostream & | OS, |
DIDumpType | DumpType = DIDT_All |
||
) | [override, virtual] |
Implements llvm::DIContext.
Definition at line 62 of file DWARFContext.cpp.
References llvm::DWARFDebugLine::LineTable::clear(), llvm::DIDT_Abbrev, llvm::DIDT_AbbrevDwo, llvm::DIDT_All, llvm::DIDT_Aranges, llvm::DIDT_Frames, llvm::DIDT_GnuPubnames, llvm::DIDT_GnuPubtypes, llvm::DIDT_Info, llvm::DIDT_InfoDwo, llvm::DIDT_Line, llvm::DIDT_LineDwo, llvm::DIDT_Loc, llvm::DIDT_LocDwo, llvm::DIDT_Pubnames, llvm::DIDT_Pubtypes, llvm::DIDT_Ranges, llvm::DIDT_Str, llvm::DIDT_StrDwo, llvm::DIDT_StrOffsetsDwo, llvm::DIDT_Types, llvm::DIDT_TypesDwo, llvm::DWARFDebugArangeSet::dump(), llvm::DWARFDebugRangeList::dump(), llvm::DWARFDebugLine::LineTable::dump(), dumpPubSection(), llvm::dwarf::DW_AT_stmt_list, extract, llvm::DWARFDebugRangeList::extract(), llvm::format(), llvm::DataExtractor::getCStr(), llvm::DataExtractor::getU32(), llvm::DWARFDebugLine::Prologue::parse(), llvm::DWARFDebugLine::LineTable::parse(), and llvm::DWARFDebugLine::LineTable::Prologue.
cu_iterator_range llvm::DWARFContext::dwo_compile_units | ( | ) | [inline] |
Get compile units in the DWO context.
Definition at line 94 of file DWARFContext.h.
tu_iterator_range llvm::DWARFContext::dwo_type_units | ( | ) | [inline] |
Get type units in the DWO context.
Definition at line 100 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] |
Implemented in llvm::DWARFContextInMemory.
virtual StringRef llvm::DWARFContext::getARangeSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
Referenced by llvm::DWARFDebugAranges::generate().
DWARFCompileUnit* llvm::DWARFContext::getCompileUnitAtIndex | ( | unsigned | index | ) | [inline] |
Get the compile unit at the specified index for this compile unit.
Definition at line 130 of file DWARFContext.h.
Get a pointer to the parsed DebugAbbrev object.
Definition at line 221 of file DWARFContext.cpp.
Get a pointer to the parsed dwo abbreviations object.
Definition at line 232 of file DWARFContext.cpp.
Get a pointer to the parsed DebugAranges object.
Definition at line 264 of file DWARFContext.cpp.
References llvm::DWARFDebugAranges::generate().
Get a pointer to the parsed frame information object.
Definition at line 273 of file DWARFContext.cpp.
virtual StringRef llvm::DWARFContext::getDebugFrameSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
Get a pointer to the parsed DebugLoc object.
Definition at line 242 of file DWARFContext.cpp.
Get a pointer to the parsed DebugLoc object.
Definition at line 254 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 136 of file DWARFContext.h.
virtual StringRef llvm::DWARFContext::getGnuPubNamesSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual StringRef llvm::DWARFContext::getGnuPubTypesSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual const Section& llvm::DWARFContext::getInfoDWOSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual const Section& llvm::DWARFContext::getInfoSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
DIInliningInfo DWARFContext::getInliningInfoForAddress | ( | uint64_t | Address, |
DILineInfoSpecifier | Specifier = DILineInfoSpecifier() |
||
) | [override, virtual] |
Implements llvm::DIContext.
Definition at line 524 of file DWARFContext.cpp.
References llvm::DIInliningInfo::addFrame(), llvm::DILineInfo::Column, llvm::DWARFDebugInfoEntryInlinedChain::DIEs, llvm::DILineInfo::FileName, llvm::DILineInfoSpecifier::FLIKind, llvm::DILineInfoSpecifier::FNKind, llvm::DILineInfo::FunctionName, llvm::DWARFDebugInfoEntryMinimal::getCallerFrame(), getFileLineInfoForCompileUnit(), getFileNameForUnit(), llvm::DWARFUnit::getInlinedChainForAddress(), llvm::DWARFDebugInfoEntryMinimal::getSubroutineName(), if(), llvm::DILineInfo::Line, Name, llvm::None, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::DWARFDebugInfoEntryInlinedChain::U.
virtual const Section& llvm::DWARFContext::getLineDWOSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
DILineInfo DWARFContext::getLineInfoForAddress | ( | uint64_t | Address, |
DILineInfoSpecifier | Specifier = DILineInfoSpecifier() |
||
) | [override, virtual] |
Implements llvm::DIContext.
Definition at line 466 of file DWARFContext.cpp.
References llvm::DILineInfoSpecifier::FLIKind, llvm::DILineInfoSpecifier::FNKind, llvm::DILineInfo::FunctionName, getFileLineInfoForCompileUnit(), getFunctionNameForAddress(), and llvm::None.
DILineInfoTable DWARFContext::getLineInfoForAddressRange | ( | uint64_t | Address, |
uint64_t | Size, | ||
DILineInfoSpecifier | Specifier = DILineInfoSpecifier() |
||
) | [override, virtual] |
Implements llvm::DIContext.
Definition at line 482 of file DWARFContext.cpp.
References llvm::DWARFDebugLine::Row::Address, llvm::DILineInfo::Column, llvm::DWARFDebugLine::Row::Column, llvm::DWARFDebugLine::Row::File, llvm::DILineInfo::FileName, llvm::DILineInfoSpecifier::FLIKind, llvm::DILineInfoSpecifier::FNKind, llvm::DILineInfo::FunctionName, getFileNameForUnit(), getFunctionNameForAddress(), llvm::DILineInfo::Line, llvm::DWARFDebugLine::Row::Line, llvm::DWARFDebugLine::LineTable::lookupAddressRange(), llvm::None, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::DWARFDebugLine::LineTable::Rows.
virtual const Section& llvm::DWARFContext::getLineSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
Get a pointer to a parsed line table corresponding to a compile unit.
Definition at line 294 of file DWARFContext.cpp.
References llvm::dwarf::DW_AT_stmt_list, llvm::DWARFUnit::getAddressByteSize(), llvm::DWARFDebugInfoEntryMinimal::getAttributeValueAsSectionOffset(), and llvm::DWARFUnit::getCompileUnitDIE().
virtual const Section& llvm::DWARFContext::getLocDWOSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual const Section& llvm::DWARFContext::getLocSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
unsigned llvm::DWARFContext::getNumCompileUnits | ( | ) | [inline] |
Get the number of compile units in this context.
Definition at line 106 of file DWARFContext.h.
unsigned llvm::DWARFContext::getNumDWOCompileUnits | ( | ) | [inline] |
Get the number of compile units in the DWO context.
Definition at line 118 of file DWARFContext.h.
unsigned llvm::DWARFContext::getNumDWOTypeUnits | ( | ) | [inline] |
Get the number of compile units in the DWO context.
Definition at line 124 of file DWARFContext.h.
unsigned llvm::DWARFContext::getNumTypeUnits | ( | ) | [inline] |
Get the number of compile units in this context.
Definition at line 112 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] |
Implemented in llvm::DWARFContextInMemory.
virtual StringRef llvm::DWARFContext::getRangeSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual StringRef llvm::DWARFContext::getStringDWOSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual StringRef llvm::DWARFContext::getStringOffsetDWOSection | ( | ) | [pure virtual] |
Implemented in llvm::DWARFContextInMemory.
virtual StringRef llvm::DWARFContext::getStringSection | ( | ) | [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] |
Implemented in llvm::DWARFContextInMemory.
Referenced by llvm::DWARFDebugAranges::generate().
static bool llvm::DWARFContext::isSupportedVersion | ( | unsigned | version | ) | [inline, static] |
Definition at line 198 of file DWARFContext.h.
Referenced by llvm::DWARFUnit::extractImpl().
tu_iterator_range llvm::DWARFContext::type_units | ( | ) | [inline] |
Get type units in this context.
Definition at line 88 of file DWARFContext.h.