DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing. More...
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
OS. 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.
| Enumerator | |
|---|---|
| Process | |
| Ignore | |
Definition at line 442 of file DWARFContext.h.
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=().
References DWARFContext().
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().
Definition at line 1511 of file DWARFContext.cpp.
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().
Definition at line 2452 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().
Definition at line 2468 of file DWARFContext.cpp.
References isLittleEndian().
Implements llvm::DIContext.
Definition at line 158 of file DWARFContext.h.
References llvm::DIDT_ID_Count, and dump().
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().
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().
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().
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().
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().
Get a reference to the parsed accelerator table object.
Definition at line 1479 of file DWARFContext.cpp.
Referenced by dump().
Get a reference to the parsed accelerator table object.
Definition at line 1487 of file DWARFContext.cpp.
Referenced by dump().
Get a reference to the parsed accelerator table object.
Definition at line 1491 of file DWARFContext.cpp.
Referenced by dump().
Get a reference to the parsed accelerator table object.
Definition at line 1483 of file DWARFContext.cpp.
Referenced by dump().
Definition at line 467 of file DWARFContext.h.
References getDWARFObj().
Return the compile unit which contains instruction with provided address.
TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address"
Definition at line 1527 of file DWARFContext.cpp.
References llvm::Address, llvm::DWARFDebugAranges::findAddress(), getCompileUnitForOffset(), and getDebugAranges().
Referenced by getDIEsForAddress(), getInliningInfoForAddress(), getLineInfoForAddress(), getLineInfoForAddressRange(), and getLocalsForAddress().
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 1532 of file DWARFContext.cpp.
References llvm::Address, compile_units(), llvm::DWARFDebugAranges::findAddress(), getCompileUnitForOffset(), and getDebugAranges().
Referenced by getLineInfoForDataAddress().
Return the compile unit that includes an offset (relative to .debug_info).
Definition at line 1523 of file DWARFContext.cpp.
References llvm::dyn_cast_or_null(), getUnitForOffset(), and llvm::Offset.
Referenced by getCompileUnitForCodeAddress(), and getCompileUnitForDataAddress().
Get address size from CUs.
TODO: refactor compile_units() to make this const.
Definition at line 2479 of file DWARFContext.cpp.
References compile_units().
Referenced by dump().
Definition at line 1422 of file DWARFContext.cpp.
Referenced by dump(), and getDWOCompileUnitForHash().
Get a pointer to the parsed DebugAbbrev object.
Definition at line 1434 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed dwo abbreviations object.
Definition at line 1438 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed DebugAranges object.
Definition at line 1446 of file DWARFContext.cpp.
Referenced by getCompileUnitForCodeAddress(), and getCompileUnitForDataAddress().
Get a pointer to the parsed frame information object.
Definition at line 1450 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed DebugLoc object.
Definition at line 1442 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed DebugMacinfo information object.
Definition at line 1466 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed DebugMacinfoDWO information object.
Definition at line 1470 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed DebugMacro information object.
Definition at line 1458 of file DWARFContext.cpp.
Referenced by dump().
Get a pointer to the parsed DebugMacroDWO information object.
Definition at line 1462 of file DWARFContext.cpp.
Referenced by dump().
Get a reference to the parsed accelerator table object.
Definition at line 1475 of file DWARFContext.cpp.
Referenced by dump().
Get a DIE given an exact offset.
Definition at line 1396 of file DWARFContext.cpp.
References llvm::Offset.
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"
Definition at line 1555 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().
Definition at line 147 of file DWARFContext.h.
Referenced by dumpAttribute(), llvm::DWARFDebugAranges::generate(), getArch(), and getTypeUnitForHash().
Definition at line 1366 of file DWARFContext.cpp.
References dwo_compile_units(), llvm::dyn_cast(), llvm::dyn_cast_or_null(), getCUIndex(), llvm::DWARFUnitVector::getUnitForIndexEntry(), and llvm::dwarf::toUnsigned().
Definition at line 1904 of file DWARFContext.cpp.
Get the unit at the specified index for the DWO units.
Definition at line 263 of file DWARFContext.h.
Definition at line 208 of file DWARFContext.h.
Get a pointer to the parsed eh frame information object.
Definition at line 1454 of file DWARFContext.cpp.
Referenced by dump().
Definition at line 1430 of file DWARFContext.cpp.
Referenced by dump().
Implements llvm::DIContext.
Definition at line 1834 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().
Implements llvm::DIContext.
Definition at line 1743 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForCodeAddress(), getFunctionNameAndStartLineForAddress(), and getLineTableForUnit().
Implements llvm::DIContext.
Definition at line 1779 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.
Implements llvm::DIContext.
Definition at line 1765 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForDataAddress(), llvm::DWARFDie::getDeclFile(), and llvm::DWARFDie::getDeclLine().
Definition at line 365 of file DWARFContext.h.
Get a pointer to a parsed line table corresponding to a compile unit.
Report any parsing issues as warnings on stderr.
Definition at line 1496 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().
Get a pointer to a parsed line table corresponding to a compile unit.
Report any recoverable parsing problems using the handler.
Definition at line 1506 of file DWARFContext.cpp.
Implements llvm::DIContext.
Definition at line 1730 of file DWARFContext.cpp.
References llvm::Address, getCompileUnitForCodeAddress(), and llvm::DWARFDie::isValid().
Definition at line 285 of file DWARFContext.h.
References dwo_info_section_units().
Definition at line 405 of file DWARFContext.h.
Referenced by llvm::DWARFUnitHeader::extract(), and isSupportedVersion().
Definition at line 279 of file DWARFContext.h.
References info_section_units().
Referenced by dump().
Definition at line 176 of file DWARFContext.h.
Get the number of compile units in this context.
Definition at line 238 of file DWARFContext.h.
Referenced by dump().
Get the number of compile units in the DWO context.
Definition at line 248 of file DWARFContext.h.
Referenced by dump().
Get the number of type units in the DWO context.
Definition at line 253 of file DWARFContext.h.
Referenced by dump().
Get the number of type units in this context.
Definition at line 243 of file DWARFContext.h.
Referenced by dump().
Returns whether CU/TU should be populated manually.
TU Index populated manually only for DWARF5.
Definition at line 488 of file DWARFContext.h.
Definition at line 436 of file DWARFContext.h.
Referenced by llvm::DWARFDebugAranges::generate().
Definition at line 362 of file DWARFContext.h.
Definition at line 359 of file DWARFContext.h.
Definition at line 410 of file DWARFContext.h.
Referenced by checkAddressSizeSupported(), and isAddressSizeSupported().
Definition at line 1426 of file DWARFContext.cpp.
Referenced by dump(), and getTypeUnitForHash().
Definition at line 1344 of file DWARFContext.cpp.
References llvm::DW_SECT_EXT_TYPES, llvm::dyn_cast_or_null(), llvm::DWARFObject::forEachTypesDWOSections(), getDWARFObj(), 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 1519 of file DWARFContext.cpp.
References llvm::Offset.
Referenced by getCompileUnitForOffset().
Definition at line 440 of file DWARFContext.h.
Referenced by llvm::DWARFDebugAranges::generate().
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().
Return true of this DWARF context is a DWP file.
Definition at line 2489 of file DWARFContext.cpp.
Referenced by extractCUsTus().
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().
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().
References DWARFContext().
Definition at line 291 of file DWARFContext.h.
References llvm::Version.
Sets whether CU/TU should be populated manually.
TU Index populated manually only for DWARF5.
Definition at line 492 of file DWARFContext.h.
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().
Reimplemented from llvm::DIContext.
Definition at line 1402 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().
Definition at line 107 of file DWARFContext.h.
References llvm::WithColor::defaultErrorHandler(), and llvm::WithColor::defaultWarningHandler().