llvm::DWARFContext

DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing. The actual data is supplied through DWARFObj.

Synopsis

Declared in <llvm/DebugInfo/DWARF/DWARFContext.h>

class DWARFContext
    : public DIContext

Base Classes

NameDescription
DIContextAbstract interface for querying and dumping debug information.

Types

NameDescription
DIEsForAddress Wraps the returned DIEs for a given address.
DWARFContextState Holds DWARFContext member state that must be protected under threading.

Type Aliases

NameDescription
compile_unit_range Iterator range filtered to compile units only.
unit_iterator_range Iterator range over DWARF units (compile and/or type units).

Enums

NameDescription
DIContextKind Concrete debug-info backend implemented by this context.
ProcessDebugRelocations Whether create() should apply or ignore debug-info relocations.

Member Functions

NameDescription
DWARFContext [constructor]Constructors
~DWARFContext [destructor] [virtual]Default destructor; releases parsed DWARF state owned by the context.
operator= [deleted]Copy assignment is deleted; DWARFContext is move-only in practice.
clearLineTableForUnit Clear the cached line table for compile unit U.
compile_units Get compile units in this context.
dump dump overloads
dwo_compile_units Get compile units in the DWO context.
dwo_info_section_units Get units from .debug_info..dwo in the DWO context.
dwo_types_section_units Get units from .debug_types.dwo in the DWO context.
dwo_units Get all units in the DWO context.
getAppleNames Get a reference to the parsed accelerator table object.
getAppleNamespaces Get a reference to the parsed accelerator table object.
getAppleObjC Get a reference to the parsed accelerator table object.
getAppleTypes Get a reference to the parsed accelerator table object.
getArch Return the target architecture of the object file providing this DWARF.
getCUAddrSize Get address size from CUs. TODO: refactor compile_units() to make this const.
getCUIndex Return the parsed DWARF compile-unit index (.debug_cu_index).
getCompileUnitForCodeAddress Return the compile unit which contains instruction with provided address. TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address"
getCompileUnitForDataAddress Return the compile unit that contains data at the given address.
getCompileUnitForOffset Return the compile unit that includes an offset (relative to .debug_info).
getDIEForOffset Get a DIE given an exact offset.
getDIEsForAddress Return the CU, function DIE, and lexical block DIE for an address.
getDWARFObj Return the underlying DWARF object this context interprets.
getDWOCompileUnitForHash Return the DWO compile unit whose DWO ID hash is Hash, or nullptr.
getDWOContext Return a shared DWARFContext for the DWO/DWP at AbsolutePath.
getDWOUnitAtIndex Get the unit at the specified index for the DWO units.
getDWOUnitsVector Return the vector of compile- and type-units from DWO/DWP sections.
getDebugAbbrev Get a pointer to the parsed DebugAbbrev object.
getDebugAbbrevDWO Get a pointer to the parsed dwo abbreviations object.
getDebugAranges Get a pointer to the parsed DebugAranges object.
getDebugFrame Get a pointer to the parsed frame information object.
getDebugLoc Get a pointer to the parsed DebugLoc object.
getDebugMacinfo Get a pointer to the parsed DebugMacinfo information object.
getDebugMacinfoDWO Get a pointer to the parsed DebugMacinfoDWO information object.
getDebugMacro Get a pointer to the parsed DebugMacro information object.
getDebugMacroDWO Get a pointer to the parsed DebugMacroDWO information object.
getDebugNames Get a reference to the parsed accelerator table object.
getEHFrame Get a pointer to the parsed eh frame information object.
getGdbIndex Return the parsed GDB index (.gdb_index).
getInliningInfoForAddress [virtual]Return the inlining stack (caller frames) for Address.
getKind Return the concrete debug-info backend kind of this context.
getLineInfoForAddress [virtual]Return source line information for the code address Address.
getLineInfoForAddressRange [virtual]Return line info for each address in the range []Address, Address+Size).
getLineInfoForDataAddress [virtual]Return source line information for the data address Address.
getLineStringExtractor Return a DataExtractor for the .debug_line_str section.
getLineTableForUnit getLineTableForUnit overloads
getLocalsForAddress [virtual]Return local variables visible at the code address Address.
getMaxDWOVersion Return the highest DWARF version recorded in this context after parsing compile units from .debug_info.dwo.
getMaxVersion Return the highest DWARF version seen among parsed normal units.
getNormalUnitsVector Return the lazily populated vector of compile- and type-units from .debug_info and .debug_types.
getNumCompileUnits Get the number of compile units in this context.
getNumDWOCompileUnits Get the number of compile units in the DWO context.
getNumDWOTypeUnits Get the number of type units in the DWO context.
getNumTypeUnits Get the number of type units in this context.
getParseCUTUIndexManually Returns whether CU/TU should be populated manually. TU Index populated manually only for DWARF5.
getRecoverableErrorHandler Return the handler used for recoverable parse errors.
getStringDWOExtractor Return a DataExtractor for the .debug_str.dwo section.
getStringExtractor Return a DataExtractor for the .debug_str section.
getTUIndex Get a reference to the parsed DWARF type unit index (.debug_tu_index).
getTypeUnitForHash Return the type unit whose type signature is Hash, or nullptr.
getUnitAtIndex Get the unit at the specified index.
getUnitForOffset Return the DWARF unit that includes an offset (relative to .debug_info).
getWarningHandler Return the handler used for non-fatal parse warnings.
info_section_units Get units from .debug_info in this context.
isDWP Return true of this DWARF context is a DWP file.
isLittleEndian True if the underlying DWARF object is little-endian.
normal_units Get all normal compile/type units in this context.
setMaxVersionIfGreater Raise the recorded maximum DWARF version if Version is greater.
setParseCUTUIndexManually Sets whether CU/TU should be populated manually. TU Index populated manually only for DWARF5.
types_section_units Get units from .debug_types in this context.
verify [virtual]Verify DWARF in this context, writing diagnostics to OS.

Static Member Functions

NameDescription
checkAddressSizeSupported Return success if AddressSize is supported, else a formatted error.
classof True if DICtx is a DWARFContext (kind CK_DWARF).
create create overloads
getMaxSupportedVersion Highest DWARF version number this context knows how to parse.
getSupportedAddressSizes Return the address sizes (in bytes) this context supports: 2, 4, and 8.
isAddressSizeSupported True if AddressSize is one of getSupportedAddressSizes().
isSupportedVersion True if version is between 2 and getMaxSupportedVersion() inclusive.

Friends

NameDescription
llvm::DWARFContext::DWARFContextStateHolds DWARFContext member state that must be protected under threading.

Non-Member Functions

NameDescription
getDWARFUnitIndexReturn the CU or TU index table for section kind Kind.