LLVM 22.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 , CK_GSYM } |
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. | |
std::optional< DILineInfo > | getLineInfoForAddress (object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override |
std::optional< 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 |
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 49 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 742 of file DWARFContext.cpp.
References llvm::DIContext::CK_DWARF, llvm::DIContext::DIContext(), and llvm::move().
Referenced by DWARFContext(), llvm::DWARFContext::DWARFContextState::DWARFContextState(), and operator=().
|
overridedefault |
|
delete |
References DWARFContext().
|
inlinestatic |
Definition at line 417 of file DWARFContext.h.
References llvm::format(), getSupportedAddressSizes(), isAddressSizeSupported(), llvm::make_error(), Size, and llvm::Error::success().
Referenced by llvm::DWARFDebugArangeSet::extract(), llvm::DWARFDebugRangeList::extract(), llvm::DWARFListTableHeader::extract(), and llvm::DWARFUnitHeader::extract().
Definition at line 149 of file DWARFContext.h.
References llvm::DIContext::CK_DWARF, llvm::DIContext::DIContext(), and llvm::DIContext::getKind().
void DWARFContext::clearLineTableForUnit | ( | DWARFUnit * | U | ) |
Definition at line 1500 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 dump(), extractCUsTus(), llvm::DWARFDebugAranges::generate(), getCompileUnitForDataAddress(), and getCUAddrSize().
|
static |
Definition at line 2441 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 2457 of file DWARFContext.cpp.
References isLittleEndian().
|
inlineoverridevirtual |
Implements llvm::DIContext.
Definition at line 158 of file DWARFContext.h.
References llvm::DIDT_ID_Count, and dump().
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 985 of file DWARFContext.cpp.
References compile_units(), llvm::Data, DF, llvm::DIDT_All, llvm::DIDT_ID_Count, llvm::DIDT_UUID, llvm::DIDumpOptions::DisplayRawContents, llvm::AppleAcceleratorTable::dump(), llvm::DWARFDebugAbbrev::dump(), llvm::DWARFDebugArangeSet::dump(), llvm::DWARFDebugLoc::dump(), llvm::DWARFDebugNames::dump(), llvm::DWARFDebugRangeList::dump(), llvm::DWARFDie::dump(), llvm::DWARFGdbIndex::dump(), llvm::DWARFUnitIndex::dump(), dumpAddrSection(), dumpLoclistsSection(), dumpPubTableSection(), dumpRnglistsSection(), dumpStringOffsetsSection(), llvm::DIDumpOptions::DumpType, dumpUUID(), dwo_info_section_units(), dwo_types_section_units(), dwo_units(), llvm::sys::path::extension(), llvm::DWARFDebugArangeSet::extract(), llvm::DWARFDebugRangeList::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, llvm::DIDumpOptions::noImplicitRecursion(), normal_units(), llvm::Offset, 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().
|
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(), and extractCUsTus().
const AppleAcceleratorTable & DWARFContext::getAppleNames | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1468 of file DWARFContext.cpp.
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleNamespaces | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1476 of file DWARFContext.cpp.
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleObjC | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1480 of file DWARFContext.cpp.
Referenced by dump().
const AppleAcceleratorTable & DWARFContext::getAppleTypes | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1472 of file DWARFContext.cpp.
Referenced by dump().
|
inline |
Definition at line 467 of file DWARFContext.h.
References getDWARFObj().
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 1516 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 1521 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 1512 of file DWARFContext.cpp.
References llvm::dyn_cast_or_null(), 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 2468 of file DWARFContext.cpp.
References compile_units().
Referenced by dump().
const DWARFUnitIndex & DWARFContext::getCUIndex | ( | ) |
Definition at line 1411 of file DWARFContext.cpp.
Referenced by dump(), and getDWOCompileUnitForHash().
const DWARFDebugAbbrev * DWARFContext::getDebugAbbrev | ( | ) |
Get a pointer to the parsed DebugAbbrev object.
Definition at line 1423 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugAbbrev * DWARFContext::getDebugAbbrevDWO | ( | ) |
Get a pointer to the parsed dwo abbreviations object.
Definition at line 1427 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugAranges * DWARFContext::getDebugAranges | ( | ) |
Get a pointer to the parsed DebugAranges object.
Definition at line 1435 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 1439 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugLoc * DWARFContext::getDebugLoc | ( | ) |
Get a pointer to the parsed DebugLoc object.
Definition at line 1431 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugMacro * DWARFContext::getDebugMacinfo | ( | ) |
Get a pointer to the parsed DebugMacinfo information object.
Definition at line 1455 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugMacro * DWARFContext::getDebugMacinfoDWO | ( | ) |
Get a pointer to the parsed DebugMacinfoDWO information object.
Definition at line 1459 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugMacro * DWARFContext::getDebugMacro | ( | ) |
Get a pointer to the parsed DebugMacro information object.
Definition at line 1447 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugMacro * DWARFContext::getDebugMacroDWO | ( | ) |
Get a pointer to the parsed DebugMacroDWO information object.
Definition at line 1451 of file DWARFContext.cpp.
Referenced by dump().
const DWARFDebugNames & DWARFContext::getDebugNames | ( | ) |
Get a reference to the parsed accelerator table object.
Definition at line 1464 of file DWARFContext.cpp.
Referenced by dump().
Get a DIE given an exact offset.
Definition at line 1385 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 1544 of file DWARFContext.cpp.
References llvm::Address, llvm::append_range(), llvm::dyn_cast_or_null(), getCompileUnitForCodeAddress(), llvm::DWARFDie::getDwarfUnit(), llvm::DWARFUnit::getSubroutineForAddress(), and llvm::DIE::getTag().
|
inline |
Definition at line 147 of file DWARFContext.h.
Referenced by dumpAttribute(), llvm::DWARFDebugAranges::generate(), and getArch().
DWARFCompileUnit * DWARFContext::getDWOCompileUnitForHash | ( | uint64_t | Hash | ) |
Definition at line 1355 of file DWARFContext.cpp.
References dwo_compile_units(), llvm::dyn_cast(), llvm::dyn_cast_or_null(), getCUIndex(), llvm::DWARFUnitVector::getUnitForIndexEntry(), and llvm::dwarf::toUnsigned().
std::shared_ptr< DWARFContext > DWARFContext::getDWOContext | ( | StringRef | AbsolutePath | ) |
Definition at line 1893 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.
Expected< const DWARFDebugFrame * > DWARFContext::getEHFrame | ( | ) |
Get a pointer to the parsed eh frame information object.
Definition at line 1443 of file DWARFContext.cpp.
Referenced by dump().
DWARFGdbIndex & DWARFContext::getGdbIndex | ( | ) |
Definition at line 1419 of file DWARFContext.cpp.
Referenced by dump().
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1823 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, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::DILineInfo::StartAddress, llvm::DILineInfo::StartFileName, llvm::DILineInfo::StartLine, and llvm::dwarf::toSectionedAddress().
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1732 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForCodeAddress(), getFunctionNameAndStartLineForAddress(), and getLineTableForUnit().
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1768 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 1754 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForDataAddress(), llvm::DWARFDie::getDeclFile(), and llvm::DWARFDie::getDeclLine().
|
inline |
Definition at line 365 of file DWARFContext.h.
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 1485 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 1495 of file DWARFContext.cpp.
|
overridevirtual |
Implements llvm::DIContext.
Definition at line 1719 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.
|
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().
|
inline |
Definition at line 362 of file DWARFContext.h.
|
inline |
Definition at line 359 of file DWARFContext.h.
|
inlinestatic |
Definition at line 410 of file DWARFContext.h.
Referenced by checkAddressSizeSupported(), and isAddressSizeSupported().
const DWARFUnitIndex & DWARFContext::getTUIndex | ( | ) |
Definition at line 1415 of file DWARFContext.cpp.
Referenced by dump(), and getTypeUnitForHash().
DWARFTypeUnit * DWARFContext::getTypeUnitForHash | ( | uint64_t | Hash, |
bool | IsDWO ) |
Definition at line 1344 of file DWARFContext.cpp.
References llvm::dyn_cast_or_null(), 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 1508 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(), 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 2478 of file DWARFContext.cpp.
Referenced by extractCUsTus().
|
inline |
Definition at line 404 of file DWARFContext.h.
Referenced by create(), dump(), llvm::DWARFDebugAranges::generate(), and isVariableIndexable().
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(), and extractCUsTus().
|
delete |
References DWARFContext().
|
inline |
Definition at line 291 of file DWARFContext.h.
References llvm::Version.
|
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 1391 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(), llvm::Success, and llvm::DWARFVerifier::summarize().
|
friend |
Definition at line 107 of file DWARFContext.h.
References llvm::WithColor::defaultErrorHandler(), and llvm::WithColor::defaultWarningHandler().