LLVM 20.0.0git
|
DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing. More...
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
Classes | |
struct | DIEsForAddress |
Wraps the returned DIEs for a given address. More... | |
class | DWARFContextState |
DWARFContextState This structure contains all member variables for DWARFContext that need to be protected in multi-threaded environments. More... | |
Public Types | |
enum class | ProcessDebugRelocations { Process , Ignore } |
using | unit_iterator_range = DWARFUnitVector::iterator_range |
using | compile_unit_range = DWARFUnitVector::compile_unit_range |
Public Types inherited from llvm::DIContext | |
enum | DIContextKind { CK_DWARF , CK_PDB , CK_BTF } |
Public Member Functions | |
DWARFContext (std::unique_ptr< const DWARFObject > DObj, std::string DWPName="", std::function< void(Error)> RecoverableErrorHandler=WithColor::defaultErrorHandler, std::function< void(Error)> WarningHandler=WithColor::defaultWarningHandler, bool ThreadSafe=false) | |
~DWARFContext () override | |
DWARFContext (DWARFContext &)=delete | |
DWARFContext & | operator= (DWARFContext &)=delete |
const DWARFObject & | getDWARFObj () const |
void | dump (raw_ostream &OS, DIDumpOptions DumpOpts, std::array< std::optional< uint64_t >, DIDT_ID_Count > DumpOffsets) |
Dump a textual representation to OS . | |
void | dump (raw_ostream &OS, DIDumpOptions DumpOpts) override |
bool | verify (raw_ostream &OS, DIDumpOptions DumpOpts={}) override |
unit_iterator_range | info_section_units () |
Get units from .debug_info in this context. | |
const DWARFUnitVector & | getNormalUnitsVector () |
unit_iterator_range | types_section_units () |
Get units from .debug_types in this context. | |
compile_unit_range | compile_units () |
Get compile units in this context. | |
unit_iterator_range | normal_units () |
Get all normal compile/type units in this context. | |
unit_iterator_range | dwo_info_section_units () |
Get units from .debug_info..dwo in the DWO context. | |
const DWARFUnitVector & | getDWOUnitsVector () |
bool | isDWP () const |
Return true of this DWARF context is a DWP file. | |
unit_iterator_range | dwo_types_section_units () |
Get units from .debug_types.dwo in the DWO context. | |
compile_unit_range | dwo_compile_units () |
Get compile units in the DWO context. | |
unit_iterator_range | dwo_units () |
Get all units in the DWO context. | |
unsigned | getNumCompileUnits () |
Get the number of compile units in this context. | |
unsigned | getNumTypeUnits () |
Get the number of type units in this context. | |
unsigned | getNumDWOCompileUnits () |
Get the number of compile units in the DWO context. | |
unsigned | getNumDWOTypeUnits () |
Get the number of type units in the DWO context. | |
DWARFUnit * | getUnitAtIndex (unsigned index) |
Get the unit at the specified index. | |
DWARFUnit * | getDWOUnitAtIndex (unsigned index) |
Get the unit at the specified index for the DWO units. | |
DWARFCompileUnit * | getDWOCompileUnitForHash (uint64_t Hash) |
DWARFTypeUnit * | getTypeUnitForHash (uint64_t Hash, bool IsDWO) |
DWARFUnit * | getUnitForOffset (uint64_t Offset) |
Return the DWARF unit that includes an offset (relative to .debug_info). | |
DWARFCompileUnit * | getCompileUnitForOffset (uint64_t Offset) |
Return the compile unit that includes an offset (relative to .debug_info). | |
DWARFDie | getDIEForOffset (uint64_t Offset) |
Get a DIE given an exact offset. | |
unsigned | getMaxVersion () |
unsigned | getMaxDWOVersion () |
void | setMaxVersionIfGreater (unsigned Version) |
const DWARFUnitIndex & | getCUIndex () |
DWARFGdbIndex & | getGdbIndex () |
const DWARFUnitIndex & | getTUIndex () |
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 DWARFDebugAranges * | getDebugAranges () |
Get a pointer to the parsed DebugAranges object. | |
Expected< const DWARFDebugFrame * > | getDebugFrame () |
Get a pointer to the parsed frame information object. | |
Expected< const DWARFDebugFrame * > | getEHFrame () |
Get a pointer to the parsed eh frame information object. | |
const DWARFDebugMacro * | getDebugMacinfo () |
Get a pointer to the parsed DebugMacinfo information object. | |
const DWARFDebugMacro * | getDebugMacinfoDWO () |
Get a pointer to the parsed DebugMacinfoDWO information object. | |
const DWARFDebugMacro * | getDebugMacro () |
Get a pointer to the parsed DebugMacro information object. | |
const DWARFDebugMacro * | getDebugMacroDWO () |
Get a pointer to the parsed DebugMacroDWO information object. | |
const DWARFDebugNames & | getDebugNames () |
Get a reference to the parsed accelerator table object. | |
const AppleAcceleratorTable & | getAppleNames () |
Get a reference to the parsed accelerator table object. | |
const AppleAcceleratorTable & | getAppleTypes () |
Get a reference to the parsed accelerator table object. | |
const AppleAcceleratorTable & | getAppleNamespaces () |
Get a reference to the parsed accelerator table object. | |
const AppleAcceleratorTable & | getAppleObjC () |
Get a reference to the parsed accelerator table object. | |
const DWARFDebugLine::LineTable * | getLineTableForUnit (DWARFUnit *U) |
Get a pointer to a parsed line table corresponding to a compile unit. | |
Expected< const DWARFDebugLine::LineTable * > | getLineTableForUnit (DWARFUnit *U, function_ref< void(Error)> RecoverableErrorHandler) |
Get a pointer to a parsed line table corresponding to a compile unit. | |
void | clearLineTableForUnit (DWARFUnit *U) |
DataExtractor | getStringExtractor () const |
DataExtractor | getStringDWOExtractor () const |
DataExtractor | getLineStringExtractor () const |
DIEsForAddress | getDIEsForAddress (uint64_t Address, bool CheckDWO=false) |
Get the compilation unit, the function DIE and lexical block DIE for the given address where applicable. | |
DILineInfo | getLineInfoForAddress (object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override |
DILineInfo | getLineInfoForDataAddress (object::SectionedAddress Address) override |
DILineInfoTable | getLineInfoForAddressRange (object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override |
DIInliningInfo | getInliningInfoForAddress (object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override |
std::vector< DILocal > | getLocalsForAddress (object::SectionedAddress Address) override |
bool | isLittleEndian () const |
std::shared_ptr< DWARFContext > | getDWOContext (StringRef AbsolutePath) |
function_ref< void(Error)> | getRecoverableErrorHandler () |
function_ref< void(Error)> | getWarningHandler () |
uint8_t | getCUAddrSize () |
Get address size from CUs. | |
Triple::ArchType | getArch () const |
DWARFCompileUnit * | getCompileUnitForCodeAddress (uint64_t Address) |
Return the compile unit which contains instruction with provided address. | |
DWARFCompileUnit * | getCompileUnitForDataAddress (uint64_t Address) |
Return the compile unit which contains data with the provided address. | |
bool | getParseCUTUIndexManually () const |
Returns whether CU/TU should be populated manually. | |
void | setParseCUTUIndexManually (bool PCUTU) |
Sets whether CU/TU should be populated manually. | |
Public Member Functions inherited from llvm::DIContext | |
DIContext (DIContextKind K) | |
virtual | ~DIContext ()=default |
DIContextKind | getKind () const |
virtual void | dump (raw_ostream &OS, DIDumpOptions DumpOpts)=0 |
virtual bool | verify (raw_ostream &OS, DIDumpOptions DumpOpts={}) |
virtual DILineInfo | getLineInfoForAddress (object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier())=0 |
virtual DILineInfo | getLineInfoForDataAddress (object::SectionedAddress Address)=0 |
virtual DILineInfoTable | getLineInfoForAddressRange (object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier())=0 |
virtual DIInliningInfo | getInliningInfoForAddress (object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier())=0 |
virtual std::vector< DILocal > | getLocalsForAddress (object::SectionedAddress Address)=0 |
Static Public Member Functions | |
static bool | classof (const DIContext *DICtx) |
static unsigned | getMaxSupportedVersion () |
static bool | isSupportedVersion (unsigned version) |
static SmallVector< uint8_t, 3 > | getSupportedAddressSizes () |
static bool | isAddressSizeSupported (unsigned AddressSize) |
template<typename... Ts> | |
static Error | checkAddressSizeSupported (unsigned AddressSize, std::error_code EC, char const *Fmt, const Ts &...Vals) |
static std::unique_ptr< DWARFContext > | create (const object::ObjectFile &Obj, ProcessDebugRelocations RelocAction=ProcessDebugRelocations::Process, const LoadedObjectInfo *L=nullptr, std::string DWPName="", std::function< void(Error)> RecoverableErrorHandler=WithColor::defaultErrorHandler, std::function< void(Error)> WarningHandler=WithColor::defaultWarningHandler, bool ThreadSafe=false) |
static std::unique_ptr< DWARFContext > | create (const StringMap< std::unique_ptr< MemoryBuffer > > &Sections, uint8_t AddrSize, bool isLittleEndian=sys::IsLittleEndianHost, std::function< void(Error)> RecoverableErrorHandler=WithColor::defaultErrorHandler, std::function< void(Error)> WarningHandler=WithColor::defaultWarningHandler, bool ThreadSafe=false) |
Friends | |
class | DWARFContextState |
DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing.
The actual data is supplied through DWARFObj.
Definition at line 48 of file DWARFContext.h.
Definition at line 166 of file DWARFContext.h.
Definition at line 165 of file DWARFContext.h.
|
strong |
Enumerator | |
---|---|
Process | |
Ignore |
Definition at line 442 of file DWARFContext.h.
DWARFContext::DWARFContext | ( | std::unique_ptr< const DWARFObject > | DObj, |
std::string | DWPName = "" , |
||
std::function< void(Error)> | RecoverableErrorHandler = WithColor::defaultErrorHandler , |
||
std::function< void(Error)> | WarningHandler = WithColor::defaultWarningHandler , |
||
bool | ThreadSafe = false |
||
) |
Definition at line 744 of file DWARFContext.cpp.
|
overridedefault |
|
delete |
|
inlinestatic |
Definition at line 417 of file DWARFContext.h.
References llvm::format(), getSupportedAddressSizes(), isAddressSizeSupported(), Size, and llvm::Error::success().
Referenced by llvm::DWARFDebugRangeList::extract(), llvm::DWARFUnitHeader::extract(), llvm::DWARFDebugArangeSet::extract(), and llvm::DWARFListTableHeader::extract().
Definition at line 149 of file DWARFContext.h.
References llvm::DIContext::CK_DWARF, and llvm::DIContext::getKind().
void DWARFContext::clearLineTableForUnit | ( | DWARFUnit * | U | ) |
Definition at line 1502 of file DWARFContext.cpp.
|
inline |
Get compile units in this context.
Definition at line 188 of file DWARFContext.h.
References info_section_units(), llvm::isCompileUnit(), and llvm::make_filter_range().
Referenced by llvm::gsym::DwarfTransformer::convert(), dump(), llvm::DWARFDebugAranges::generate(), getCompileUnitForDataAddress(), getCUAddrSize(), and llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo().
|
static |
Definition at line 2442 of file DWARFContext.cpp.
Referenced by llvm::MachO::DylibReader::accumulateSourceLocFromDSYM(), llvm::orc::createDWARFContext(), llvm::logicalview::LVDWARFReader::createScopes(), llvm::InstrProfCorrelatorImpl< IntPtrT >::get(), and llvm::symbolize::LLVMSymbolizer::getOrCreateModuleInfo().
|
static |
Definition at line 2458 of file DWARFContext.cpp.
References isLittleEndian().
|
inlineoverridevirtual |
Implements llvm::DIContext.
Definition at line 158 of file DWARFContext.h.
References llvm::DIDT_ID_Count, dump(), and OS.
void DWARFContext::dump | ( | raw_ostream & | OS, |
DIDumpOptions | DumpOpts, | ||
std::array< std::optional< uint64_t >, DIDT_ID_Count > | DumpOffsets | ||
) |
Dump a textual representation to OS
.
If any DumpOffsets
are present, dump only the record at the specified offset.
Definition at line 987 of file DWARFContext.cpp.
References compile_units(), llvm::Data, DF, llvm::DIDT_All, llvm::DIDT_UUID, llvm::DIDumpOptions::DisplayRawContents, llvm::DWARFGdbIndex::dump(), llvm::DWARFDebugAbbrev::dump(), llvm::DWARFDebugArangeSet::dump(), llvm::DWARFDebugRangeList::dump(), llvm::DWARFUnitIndex::dump(), llvm::AppleAcceleratorTable::dump(), llvm::DWARFDebugNames::dump(), llvm::DWARFDebugLoc::dump(), llvm::DWARFDie::dump(), dumpAddrSection(), llvm::DWARFLocationTable::dumpLocationList(), dumpLoclistsSection(), dumpPubTableSection(), llvm::DWARFDebugLoclists::dumpRange(), dumpRnglistsSection(), dumpStringOffsetsSection(), llvm::DIDumpOptions::DumpType, dumpUUID(), dwo_info_section_units(), dwo_types_section_units(), dwo_units(), llvm::sys::path::extension(), llvm::DWARFDebugRangeList::extract(), llvm::DWARFDebugArangeSet::extract(), llvm::format(), getAppleNames(), getAppleNamespaces(), getAppleObjC(), getAppleTypes(), llvm::DataExtractor::getCStr(), getCUAddrSize(), getCUIndex(), getDebugAbbrev(), getDebugAbbrevDWO(), getDebugFrame(), getDebugLoc(), getDebugMacinfo(), getDebugMacinfoDWO(), getDebugMacro(), getDebugMacroDWO(), getDebugNames(), llvm::DWARFUnit::getDIEForOffset(), llvm::DWARFDie::getDwarfUnit(), getEHFrame(), getGdbIndex(), getMaxVersion(), getNumCompileUnits(), getNumDWOCompileUnits(), getNumDWOTypeUnits(), getNumTypeUnits(), getTUIndex(), I, info_section_units(), isLittleEndian(), llvm::DataExtractor::isValidOffset(), llvm::Macro, Name, llvm::DIDumpOptions::noImplicitRecursion(), normal_units(), llvm::Offset, OS, llvm::DIDumpOptions::RecoverableErrorHandler, llvm::Error::success(), types_section_units(), llvm::DIDumpOptions::Verbose, llvm::DIDumpOptions::WarningHandler, and llvm::raw_ostream::write_escaped().
Referenced by dump().
|
inline |
Get compile units in the DWO context.
Definition at line 223 of file DWARFContext.h.
References dwo_info_section_units(), llvm::isCompileUnit(), and llvm::make_filter_range().
Referenced by getDWOCompileUnitForHash(), and llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo().
|
inline |
Get units from .debug_info..dwo in the DWO context.
Definition at line 202 of file DWARFContext.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::DWARFUnitVector::getNumInfoUnits().
Referenced by dump(), dwo_compile_units(), and getMaxDWOVersion().
|
inline |
Get units from .debug_types.dwo in the DWO context.
Definition at line 216 of file DWARFContext.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::DWARFUnitVector::getNumInfoUnits().
Referenced by dump().
|
inline |
Get all units in the DWO context.
Definition at line 232 of file DWARFContext.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleNames | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1470 of file DWARFContext.cpp.
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleNamespaces | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1478 of file DWARFContext.cpp.
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleObjC | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1482 of file DWARFContext.cpp.
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleTypes | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1474 of file DWARFContext.cpp.
Referenced by dump().
|
inline |
Definition at line 467 of file DWARFContext.h.
References llvm::object::ObjectFile::getArch(), getDWARFObj(), and llvm::DWARFObject::getFile().
DWARFCompileUnit * DWARFContext::getCompileUnitForCodeAddress | ( | uint64_t | Address | ) |
Return the compile unit which contains instruction with provided address.
TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address"
Definition at line 1518 of file DWARFContext.cpp.
References llvm::Address, llvm::DWARFDebugAranges::findAddress(), getCompileUnitForOffset(), and getDebugAranges().
Referenced by getDIEsForAddress(), getInliningInfoForAddress(), getLineInfoForAddress(), getLineInfoForAddressRange(), and getLocalsForAddress().
DWARFCompileUnit * DWARFContext::getCompileUnitForDataAddress | ( | uint64_t | Address | ) |
Return the compile unit which contains data with the provided address.
Note: This is more expensive than getCompileUnitForAddress
, as if Address
isn't found in the CU ranges (which is cheap), then it falls back to an expensive O(n) walk of all CU's looking for data that spans the address. TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address"
Definition at line 1523 of file DWARFContext.cpp.
References llvm::Address, compile_units(), llvm::DWARFDebugAranges::findAddress(), getCompileUnitForOffset(), and getDebugAranges().
Referenced by getLineInfoForDataAddress().
DWARFCompileUnit * DWARFContext::getCompileUnitForOffset | ( | uint64_t | Offset | ) |
Return the compile unit that includes an offset (relative to .debug_info).
Definition at line 1514 of file DWARFContext.cpp.
References getUnitForOffset(), and llvm::Offset.
Referenced by getCompileUnitForCodeAddress(), and getCompileUnitForDataAddress().
uint8_t DWARFContext::getCUAddrSize | ( | ) |
Get address size from CUs.
TODO: refactor compile_units() to make this const.
Definition at line 2469 of file DWARFContext.cpp.
References compile_units().
Referenced by dump().
const DWARFUnitIndex & DWARFContext::getCUIndex | ( | ) |
Definition at line 1413 of file DWARFContext.cpp.
Referenced by dump(), llvm::getDWARFUnitIndex(), and getDWOCompileUnitForHash().
const DWARFDebugAbbrev * DWARFContext::getDebugAbbrev | ( | ) |
Get a pointer to the parsed DebugAbbrev object.
Definition at line 1425 of file DWARFContext.cpp.
Referenced by dump(), and llvm::DWARFVerifier::handleDebugAbbrev().
const DWARFDebugAbbrev * DWARFContext::getDebugAbbrevDWO | ( | ) |
Get a pointer to the parsed dwo abbreviations object.
Definition at line 1429 of file DWARFContext.cpp.
Referenced by dump(), and llvm::DWARFVerifier::handleDebugAbbrev().
const DWARFDebugAranges * DWARFContext::getDebugAranges | ( | ) |
Get a pointer to the parsed DebugAranges object.
Definition at line 1437 of file DWARFContext.cpp.
Referenced by getCompileUnitForCodeAddress(), and getCompileUnitForDataAddress().
Expected< const DWARFDebugFrame * > DWARFContext::getDebugFrame | ( | ) |
Get a pointer to the parsed frame information object.
Definition at line 1441 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugLoc * DWARFContext::getDebugLoc | ( | ) |
Get a pointer to the parsed DebugLoc object.
Definition at line 1433 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugMacro * DWARFContext::getDebugMacinfo | ( | ) |
Get a pointer to the parsed DebugMacinfo information object.
Definition at line 1457 of file DWARFContext.cpp.
Referenced by dump(), and llvm::dwarf_linker::classic::DwarfStreamer::emitMacroTables().
const DWARFDebugMacro * DWARFContext::getDebugMacinfoDWO | ( | ) |
Get a pointer to the parsed DebugMacinfoDWO information object.
Definition at line 1461 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugMacro * DWARFContext::getDebugMacro | ( | ) |
Get a pointer to the parsed DebugMacro information object.
Definition at line 1449 of file DWARFContext.cpp.
Referenced by dump(), and llvm::dwarf_linker::classic::DwarfStreamer::emitMacroTables().
const DWARFDebugMacro * DWARFContext::getDebugMacroDWO | ( | ) |
Get a pointer to the parsed DebugMacroDWO information object.
Definition at line 1453 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugNames & DWARFContext::getDebugNames | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1466 of file DWARFContext.cpp.
Referenced by dump().
Get a DIE given an exact offset.
Definition at line 1387 of file DWARFContext.cpp.
References llvm::Offset.
DWARFContext::DIEsForAddress DWARFContext::getDIEsForAddress | ( | uint64_t | Address, |
bool | CheckDWO = false |
||
) |
Get the compilation unit, the function DIE and lexical block DIE for the given address where applicable.
TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address"
[in] | CheckDWO | If this is false then only search for address matches in the current context's DIEs. If this is true, then each DWARFUnit that has a DWO file will have the debug info in the DWO file searched as well. This allows for lookups to succeed by searching the split DWARF debug info when using the main executable's debug info. |
Definition at line 1546 of file DWARFContext.cpp.
References llvm::Address, llvm::append_range(), getCompileUnitForCodeAddress(), llvm::DWARFDie::getDwarfUnit(), llvm::DWARFUnit::getSubroutineForAddress(), and llvm::DIE::getTag().
|
inline |
Definition at line 147 of file DWARFContext.h.
Referenced by dumpAttribute(), dumpLocationList(), llvm::DWARFFormValue::dumpSectionedAddress(), llvm::DWARFVerifier::DWARFVerifier(), llvm::DWARFUnit::extractRangeList(), llvm::DWARFUnit::findRnglistFromOffset(), llvm::DWARFDebugAranges::generate(), llvm::DWARFUnit::getAddrOffsetSectionItem(), getArch(), llvm::DWARFUnit::getDebugInfoExtractor(), llvm::DWARFUnit::getRnglistOffset(), llvm::DWARFUnit::getStringOffsetSectionItem(), llvm::DWARFVerifier::handleAccelTables(), llvm::DWARFVerifier::handleDebugAbbrev(), llvm::DWARFVerifier::handleDebugCUIndex(), llvm::DWARFVerifier::handleDebugInfo(), llvm::DWARFVerifier::handleDebugStrOffsets(), llvm::DWARFVerifier::handleDebugTUIndex(), llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo(), llvm::DWARFUnit::tryExtractDIEsIfNeeded(), and llvm::DWARFVerifier::verifyDebugStrOffsets().
DWARFCompileUnit * DWARFContext::getDWOCompileUnitForHash | ( | uint64_t | Hash | ) |
Definition at line 1357 of file DWARFContext.cpp.
References dwo_compile_units(), getCUIndex(), llvm::DWARFUnitVector::getUnitForIndexEntry(), and llvm::dwarf::toUnsigned().
std::shared_ptr< DWARFContext > DWARFContext::getDWOContext | ( | StringRef | AbsolutePath | ) |
Definition at line 1894 of file DWARFContext.cpp.
Get the unit at the specified index for the DWO units.
Definition at line 263 of file DWARFContext.h.
|
inline |
Definition at line 208 of file DWARFContext.h.
Referenced by llvm::DWARFVerifier::handleDebugInfo().
Expected< const DWARFDebugFrame * > DWARFContext::getEHFrame | ( | ) |
Get a pointer to the parsed eh frame information object.
Definition at line 1445 of file DWARFContext.cpp.
Referenced by dump().
DWARFGdbIndex & DWARFContext::getGdbIndex | ( | ) |
Definition at line 1421 of file DWARFContext.cpp.
Referenced by dump().
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1824 of file DWARFContext.cpp.
References llvm::DIInliningInfo::addFrame(), llvm::Address, llvm::DILineInfo::Column, llvm::DILineInfo::Discriminator, llvm::DILineInfo::FileName, llvm::DWARFDie::find(), llvm::DILineInfo::FunctionName, llvm::DWARFDie::getCallerFrame(), getCompileUnitForCodeAddress(), llvm::DWARFDie::getDeclFile(), llvm::DWARFDie::getDeclLine(), llvm::DWARFDebugLine::LineTable::getFileLineInfoForAddress(), llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), getLineTableForUnit(), llvm::DWARFDie::getSubroutineName(), llvm::DILineInfo::Line, Name, llvm::SmallVectorBase< Size_T >::size(), llvm::DILineInfo::StartAddress, llvm::DILineInfo::StartFileName, llvm::DILineInfo::StartLine, and llvm::dwarf::toSectionedAddress().
Referenced by llvm::gsym::DwarfTransformer::verify().
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1733 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForCodeAddress(), getFunctionNameAndStartLineForAddress(), and getLineTableForUnit().
Referenced by llvm::gsym::DwarfTransformer::verify().
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1769 of file DWARFContext.cpp.
References llvm::Address, llvm::DILineInfo::BadString, getCompileUnitForCodeAddress(), llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), getFunctionNameAndStartLineForAddress(), getLineTableForUnit(), llvm::DWARFDebugLine::LineTable::lookupAddressRange(), llvm::DWARFDebugLine::LineTable::Rows, and Size.
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1755 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForDataAddress(), llvm::DWARFDie::getDeclFile(), and llvm::DWARFDie::getDeclLine().
|
inline |
Definition at line 365 of file DWARFContext.h.
Referenced by llvm::DWARFFormValue::getAsCString().
const DWARFDebugLine::LineTable * DWARFContext::getLineTableForUnit | ( | DWARFUnit * | U | ) |
Get a pointer to a parsed line table corresponding to a compile unit.
Report any parsing issues as warnings on stderr.
Definition at line 1487 of file DWARFContext.cpp.
References getLineTableForUnit(), and llvm::Expected< T >::takeError().
Referenced by llvm::gsym::CUInfo::CUInfo(), llvm::DWARFFormValue::getAsFile(), getInliningInfoForAddress(), getLineInfoForAddress(), getLineInfoForAddressRange(), and getLineTableForUnit().
Expected< const DWARFDebugLine::LineTable * > DWARFContext::getLineTableForUnit | ( | DWARFUnit * | U, |
function_ref< void(Error)> | RecoverableErrorHandler | ||
) |
Get a pointer to a parsed line table corresponding to a compile unit.
Report any recoverable parsing problems using the handler.
Definition at line 1497 of file DWARFContext.cpp.
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1721 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForCodeAddress(), and llvm::DWARFDie::isValid().
|
inline |
Definition at line 285 of file DWARFContext.h.
References dwo_info_section_units().
|
inlinestatic |
Definition at line 405 of file DWARFContext.h.
Referenced by llvm::DWARFUnitHeader::extract(), and isSupportedVersion().
|
inline |
Definition at line 279 of file DWARFContext.h.
References info_section_units().
Referenced by dump().
|
inline |
Definition at line 176 of file DWARFContext.h.
Referenced by llvm::DWARFVerifier::handleDebugInfo().
|
inline |
Get the number of compile units in this context.
Definition at line 238 of file DWARFContext.h.
Referenced by dump().
|
inline |
Get the number of compile units in the DWO context.
Definition at line 248 of file DWARFContext.h.
Referenced by dump().
|
inline |
Get the number of type units in the DWO context.
Definition at line 253 of file DWARFContext.h.
Referenced by dump().
|
inline |
Get the number of type units in this context.
Definition at line 243 of file DWARFContext.h.
Referenced by dump().
|
inline |
Returns whether CU/TU should be populated manually.
TU Index populated manually only for DWARF5.
Definition at line 488 of file DWARFContext.h.
|
inline |
Definition at line 436 of file DWARFContext.h.
Referenced by llvm::DWARFDebugAranges::generate(), and llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo().
|
inline |
Definition at line 362 of file DWARFContext.h.
Referenced by llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo().
|
inline |
Definition at line 359 of file DWARFContext.h.
Referenced by llvm::DWARFFormValue::getAsCString(), and llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo().
|
inlinestatic |
Definition at line 410 of file DWARFContext.h.
Referenced by checkAddressSizeSupported(), and isAddressSizeSupported().
const DWARFUnitIndex & DWARFContext::getTUIndex | ( | ) |
Definition at line 1417 of file DWARFContext.cpp.
Referenced by dump(), llvm::getDWARFUnitIndex(), and getTypeUnitForHash().
DWARFTypeUnit * DWARFContext::getTypeUnitForHash | ( | uint64_t | Hash, |
bool | IsDWO | ||
) |
Definition at line 1346 of file DWARFContext.cpp.
References getTUIndex(), and llvm::DWARFUnitVector::getUnitForIndexEntry().
Referenced by llvm::DWARFDie::getAttributeValueAsReferencedDie(), and llvm::DWARFDie::resolveTypeUnitReference().
Get the unit at the specified index.
Definition at line 258 of file DWARFContext.h.
Return the DWARF unit that includes an offset (relative to .debug_info).
Definition at line 1510 of file DWARFContext.cpp.
References llvm::Offset.
Referenced by getCompileUnitForOffset().
|
inline |
Definition at line 440 of file DWARFContext.h.
Referenced by llvm::DWARFDebugAranges::generate().
|
inline |
Get units from .debug_info in this context.
Definition at line 169 of file DWARFContext.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::DWARFUnitVector::getNumInfoUnits().
Referenced by compile_units(), dump(), llvm::DWARFUnit::getAddrOffsetSectionItem(), and getMaxVersion().
Definition at line 413 of file DWARFContext.h.
References getSupportedAddressSizes(), and llvm::is_contained().
Referenced by checkAddressSizeSupported(), and llvm::DWARFDebugRangeList::RangeListEntry::isBaseAddressSelectionEntry().
bool DWARFContext::isDWP | ( | ) | const |
Return true of this DWARF context is a DWP file.
Definition at line 2479 of file DWARFContext.cpp.
|
inline |
Definition at line 404 of file DWARFContext.h.
Referenced by create(), dump(), dumpLocationExpr(), llvm::DWARFDebugAranges::generate(), llvm::DWARFVerifier::handleAccelTables(), llvm::DWARFVerifier::handleDebugStrOffsets(), isVariableIndexable(), llvm::DWARFContext::DWARFContextState::parseMacroOrMacinfo(), and llvm::DWARFVerifier::verifyDebugStrOffsets().
Definition at line 406 of file DWARFContext.h.
References getMaxSupportedVersion().
Referenced by llvm::DWARFUnitHeader::extract().
|
inline |
Get all normal compile/type units in this context.
Definition at line 196 of file DWARFContext.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced by dump().
|
delete |
|
inline |
Definition at line 291 of file DWARFContext.h.
References llvm::Version.
Referenced by llvm::DWARFUnitHeader::extract().
|
inline |
Sets whether CU/TU should be populated manually.
TU Index populated manually only for DWARF5.
Definition at line 492 of file DWARFContext.h.
|
inline |
Get units from .debug_types in this context.
Definition at line 181 of file DWARFContext.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::DWARFUnitVector::getNumInfoUnits().
Referenced by dump().
|
overridevirtual |
Reimplemented from llvm::DIContext.
Definition at line 1393 of file DWARFContext.cpp.
References llvm::DIDumpOptions::DumpType, llvm::DWARFVerifier::handleAccelTables(), llvm::DWARFVerifier::handleDebugAbbrev(), llvm::DWARFVerifier::handleDebugCUIndex(), llvm::DWARFVerifier::handleDebugInfo(), llvm::DWARFVerifier::handleDebugLine(), llvm::DWARFVerifier::handleDebugStrOffsets(), llvm::DWARFVerifier::handleDebugTUIndex(), OS, Success, and llvm::DWARFVerifier::summarize().
|
friend |
Definition at line 107 of file DWARFContext.h.