LLVM 19.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::DWARFContext Class Reference

DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing. More...

#include "llvm/DebugInfo/DWARF/DWARFContext.h"

Inheritance diagram for llvm::DWARFContext:
Inheritance graph
[legend]

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
 
DWARFContextoperator= (DWARFContext &)=delete
 
const DWARFObjectgetDWARFObj () 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 DWARFUnitVectorgetNormalUnitsVector ()
 
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 DWARFUnitVectorgetDWOUnitsVector ()
 
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.
 
DWARFUnitgetUnitAtIndex (unsigned index)
 Get the unit at the specified index.
 
DWARFUnitgetDWOUnitAtIndex (unsigned index)
 Get the unit at the specified index for the DWO units.
 
DWARFCompileUnitgetDWOCompileUnitForHash (uint64_t Hash)
 
DWARFTypeUnitgetTypeUnitForHash (uint16_t Version, uint64_t Hash, bool IsDWO)
 
DWARFCompileUnitgetCompileUnitForOffset (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 DWARFUnitIndexgetCUIndex ()
 
DWARFGdbIndexgetGdbIndex ()
 
const DWARFUnitIndexgetTUIndex ()
 
const DWARFDebugAbbrevgetDebugAbbrev ()
 Get a pointer to the parsed DebugAbbrev object.
 
const DWARFDebugLocgetDebugLoc ()
 Get a pointer to the parsed DebugLoc object.
 
const DWARFDebugAbbrevgetDebugAbbrevDWO ()
 Get a pointer to the parsed dwo abbreviations object.
 
const DWARFDebugArangesgetDebugAranges ()
 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 DWARFDebugMacrogetDebugMacinfo ()
 Get a pointer to the parsed DebugMacinfo information object.
 
const DWARFDebugMacrogetDebugMacinfoDWO ()
 Get a pointer to the parsed DebugMacinfoDWO information object.
 
const DWARFDebugMacrogetDebugMacro ()
 Get a pointer to the parsed DebugMacro information object.
 
const DWARFDebugMacrogetDebugMacroDWO ()
 Get a pointer to the parsed DebugMacroDWO information object.
 
const DWARFDebugNamesgetDebugNames ()
 Get a reference to the parsed accelerator table object.
 
const AppleAcceleratorTablegetAppleNames ()
 Get a reference to the parsed accelerator table object.
 
const AppleAcceleratorTablegetAppleTypes ()
 Get a reference to the parsed accelerator table object.
 
const AppleAcceleratorTablegetAppleNamespaces ()
 Get a reference to the parsed accelerator table object.
 
const AppleAcceleratorTablegetAppleObjC ()
 Get a reference to the parsed accelerator table object.
 
const DWARFDebugLine::LineTablegetLineTableForUnit (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< DILocalgetLocalsForAddress (object::SectionedAddress Address) override
 
bool isLittleEndian () const
 
std::shared_ptr< DWARFContextgetDWOContext (StringRef AbsolutePath)
 
function_ref< void(Error)> getRecoverableErrorHandler ()
 
function_ref< void(Error)> getWarningHandler ()
 
uint8_t getCUAddrSize ()
 Get address size from CUs.
 
Triple::ArchType getArch () const
 
DWARFCompileUnitgetCompileUnitForCodeAddress (uint64_t Address)
 Return the compile unit which contains instruction with provided address.
 
DWARFCompileUnitgetCompileUnitForDataAddress (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< DILocalgetLocalsForAddress (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< DWARFContextcreate (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< DWARFContextcreate (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
 

Detailed Description

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.

Member Typedef Documentation

◆ compile_unit_range

Definition at line 166 of file DWARFContext.h.

◆ unit_iterator_range

Definition at line 165 of file DWARFContext.h.

Member Enumeration Documentation

◆ ProcessDebugRelocations

Enumerator
Process 
Ignore 

Definition at line 436 of file DWARFContext.h.

Constructor & Destructor Documentation

◆ DWARFContext() [1/2]

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 746 of file DWARFContext.cpp.

◆ ~DWARFContext()

DWARFContext::~DWARFContext ( )
overridedefault

◆ DWARFContext() [2/2]

llvm::DWARFContext::DWARFContext ( DWARFContext )
delete

Member Function Documentation

◆ checkAddressSizeSupported()

template<typename... Ts>
static Error llvm::DWARFContext::checkAddressSizeSupported ( unsigned  AddressSize,
std::error_code  EC,
char const Fmt,
const Ts &...  Vals 
)
inlinestatic

◆ classof()

static bool llvm::DWARFContext::classof ( const DIContext DICtx)
inlinestatic

Definition at line 149 of file DWARFContext.h.

References llvm::DIContext::CK_DWARF, and llvm::DIContext::getKind().

◆ clearLineTableForUnit()

void DWARFContext::clearLineTableForUnit ( DWARFUnit U)

Definition at line 1504 of file DWARFContext.cpp.

◆ compile_units()

compile_unit_range llvm::DWARFContext::compile_units ( )
inline

◆ create() [1/2]

std::unique_ptr< DWARFContext > 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

◆ create() [2/2]

std::unique_ptr< DWARFContext > 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 
)
static

Definition at line 2456 of file DWARFContext.cpp.

References isLittleEndian().

◆ dump() [1/2]

void llvm::DWARFContext::dump ( raw_ostream OS,
DIDumpOptions  DumpOpts 
)
inlineoverridevirtual

Implements llvm::DIContext.

Definition at line 158 of file DWARFContext.h.

References llvm::DIDT_ID_Count, dump(), and OS.

◆ dump() [2/2]

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 988 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().

◆ dwo_compile_units()

compile_unit_range llvm::DWARFContext::dwo_compile_units ( )
inline

◆ dwo_info_section_units()

unit_iterator_range llvm::DWARFContext::dwo_info_section_units ( )
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().

◆ dwo_types_section_units()

unit_iterator_range llvm::DWARFContext::dwo_types_section_units ( )
inline

Get units from .debug_types.dwo in the DWO context.

Definition at line 213 of file DWARFContext.h.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::DWARFUnitVector::getNumInfoUnits().

Referenced by dump().

◆ dwo_units()

unit_iterator_range llvm::DWARFContext::dwo_units ( )
inline

Get all units in the DWO context.

Definition at line 229 of file DWARFContext.h.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::SmallVectorTemplateCommon< T, typename >::end().

Referenced by dump().

◆ getAppleNames()

const AppleAcceleratorTable & DWARFContext::getAppleNames ( )

Get a reference to the parsed accelerator table object.

Definition at line 1472 of file DWARFContext.cpp.

Referenced by dump().

◆ getAppleNamespaces()

const AppleAcceleratorTable & DWARFContext::getAppleNamespaces ( )

Get a reference to the parsed accelerator table object.

Definition at line 1480 of file DWARFContext.cpp.

Referenced by dump().

◆ getAppleObjC()

const AppleAcceleratorTable & DWARFContext::getAppleObjC ( )

Get a reference to the parsed accelerator table object.

Definition at line 1484 of file DWARFContext.cpp.

Referenced by dump().

◆ getAppleTypes()

const AppleAcceleratorTable & DWARFContext::getAppleTypes ( )

Get a reference to the parsed accelerator table object.

Definition at line 1476 of file DWARFContext.cpp.

Referenced by dump().

◆ getArch()

Triple::ArchType llvm::DWARFContext::getArch ( ) const
inline

◆ getCompileUnitForCodeAddress()

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 1517 of file DWARFContext.cpp.

References llvm::Address, llvm::DWARFDebugAranges::findAddress(), getCompileUnitForOffset(), and getDebugAranges().

Referenced by getDIEsForAddress(), getInliningInfoForAddress(), getLineInfoForAddress(), getLineInfoForAddressRange(), and getLocalsForAddress().

◆ getCompileUnitForDataAddress()

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 1522 of file DWARFContext.cpp.

References llvm::Address, compile_units(), llvm::DWARFDebugAranges::findAddress(), getCompileUnitForOffset(), and getDebugAranges().

Referenced by getLineInfoForDataAddress().

◆ getCompileUnitForOffset()

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::Offset.

Referenced by getCompileUnitForCodeAddress(), and getCompileUnitForDataAddress().

◆ getCUAddrSize()

uint8_t DWARFContext::getCUAddrSize ( )

Get address size from CUs.

TODO: refactor compile_units() to make this const.

Definition at line 2467 of file DWARFContext.cpp.

References compile_units().

Referenced by dump().

◆ getCUIndex()

const DWARFUnitIndex & DWARFContext::getCUIndex ( )

Definition at line 1415 of file DWARFContext.cpp.

Referenced by dump(), and getDWOCompileUnitForHash().

◆ getDebugAbbrev()

const DWARFDebugAbbrev * DWARFContext::getDebugAbbrev ( )

Get a pointer to the parsed DebugAbbrev object.

Definition at line 1427 of file DWARFContext.cpp.

Referenced by dump(), and llvm::DWARFVerifier::handleDebugAbbrev().

◆ getDebugAbbrevDWO()

const DWARFDebugAbbrev * DWARFContext::getDebugAbbrevDWO ( )

Get a pointer to the parsed dwo abbreviations object.

Definition at line 1431 of file DWARFContext.cpp.

Referenced by dump(), and llvm::DWARFVerifier::handleDebugAbbrev().

◆ getDebugAranges()

const DWARFDebugAranges * DWARFContext::getDebugAranges ( )

Get a pointer to the parsed DebugAranges object.

Definition at line 1439 of file DWARFContext.cpp.

Referenced by getCompileUnitForCodeAddress(), and getCompileUnitForDataAddress().

◆ getDebugFrame()

Expected< const DWARFDebugFrame * > DWARFContext::getDebugFrame ( )

Get a pointer to the parsed frame information object.

Definition at line 1443 of file DWARFContext.cpp.

Referenced by dump().

◆ getDebugLoc()

const DWARFDebugLoc * DWARFContext::getDebugLoc ( )

Get a pointer to the parsed DebugLoc object.

Definition at line 1435 of file DWARFContext.cpp.

Referenced by dump().

◆ getDebugMacinfo()

const DWARFDebugMacro * DWARFContext::getDebugMacinfo ( )

Get a pointer to the parsed DebugMacinfo information object.

Definition at line 1459 of file DWARFContext.cpp.

Referenced by dump().

◆ getDebugMacinfoDWO()

const DWARFDebugMacro * DWARFContext::getDebugMacinfoDWO ( )

Get a pointer to the parsed DebugMacinfoDWO information object.

Definition at line 1463 of file DWARFContext.cpp.

Referenced by dump().

◆ getDebugMacro()

const DWARFDebugMacro * DWARFContext::getDebugMacro ( )

Get a pointer to the parsed DebugMacro information object.

Definition at line 1451 of file DWARFContext.cpp.

Referenced by dump().

◆ getDebugMacroDWO()

const DWARFDebugMacro * DWARFContext::getDebugMacroDWO ( )

Get a pointer to the parsed DebugMacroDWO information object.

Definition at line 1455 of file DWARFContext.cpp.

Referenced by dump().

◆ getDebugNames()

const DWARFDebugNames & DWARFContext::getDebugNames ( )

Get a reference to the parsed accelerator table object.

Definition at line 1468 of file DWARFContext.cpp.

Referenced by dump().

◆ getDIEForOffset()

DWARFDie DWARFContext::getDIEForOffset ( uint64_t  Offset)

Get a DIE given an exact offset.

Definition at line 1389 of file DWARFContext.cpp.

References llvm::Offset.

◆ getDIEsForAddress()

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"

Parameters
[in]CheckDWOIf 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 1545 of file DWARFContext.cpp.

References llvm::Address, llvm::append_range(), getCompileUnitForCodeAddress(), llvm::DWARFDie::getDwarfUnit(), llvm::DWARFUnit::getSubroutineForAddress(), and llvm::DIE::getTag().

◆ getDWARFObj()

const DWARFObject & llvm::DWARFContext::getDWARFObj ( ) const
inline

◆ getDWOCompileUnitForHash()

DWARFCompileUnit * DWARFContext::getDWOCompileUnitForHash ( uint64_t  Hash)

◆ getDWOContext()

std::shared_ptr< DWARFContext > DWARFContext::getDWOContext ( StringRef  AbsolutePath)

Definition at line 1892 of file DWARFContext.cpp.

◆ getDWOUnitAtIndex()

DWARFUnit * llvm::DWARFContext::getDWOUnitAtIndex ( unsigned  index)
inline

Get the unit at the specified index for the DWO units.

Definition at line 260 of file DWARFContext.h.

◆ getDWOUnitsVector()

const DWARFUnitVector & llvm::DWARFContext::getDWOUnitsVector ( )
inline

Definition at line 208 of file DWARFContext.h.

Referenced by llvm::DWARFVerifier::handleDebugInfo().

◆ getEHFrame()

Expected< const DWARFDebugFrame * > DWARFContext::getEHFrame ( )

Get a pointer to the parsed eh frame information object.

Definition at line 1447 of file DWARFContext.cpp.

Referenced by dump().

◆ getGdbIndex()

DWARFGdbIndex & DWARFContext::getGdbIndex ( )

Definition at line 1423 of file DWARFContext.cpp.

Referenced by dump().

◆ getInliningInfoForAddress()

DIInliningInfo DWARFContext::getInliningInfoForAddress ( object::SectionedAddress  Address,
DILineInfoSpecifier  Specifier = DILineInfoSpecifier() 
)
overridevirtual

◆ getLineInfoForAddress()

DILineInfo DWARFContext::getLineInfoForAddress ( object::SectionedAddress  Address,
DILineInfoSpecifier  Specifier = DILineInfoSpecifier() 
)
overridevirtual

◆ getLineInfoForAddressRange()

DILineInfoTable DWARFContext::getLineInfoForAddressRange ( object::SectionedAddress  Address,
uint64_t  Size,
DILineInfoSpecifier  Specifier = DILineInfoSpecifier() 
)
overridevirtual

◆ getLineInfoForDataAddress()

DILineInfo DWARFContext::getLineInfoForDataAddress ( object::SectionedAddress  Address)
overridevirtual

◆ getLineStringExtractor()

DataExtractor llvm::DWARFContext::getLineStringExtractor ( ) const
inline

Definition at line 359 of file DWARFContext.h.

Referenced by llvm::DWARFFormValue::getAsCString().

◆ getLineTableForUnit() [1/2]

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 1489 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().

◆ getLineTableForUnit() [2/2]

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 1499 of file DWARFContext.cpp.

◆ getLocalsForAddress()

std::vector< DILocal > DWARFContext::getLocalsForAddress ( object::SectionedAddress  Address)
overridevirtual

◆ getMaxDWOVersion()

unsigned llvm::DWARFContext::getMaxDWOVersion ( )
inline

Definition at line 279 of file DWARFContext.h.

References dwo_info_section_units().

◆ getMaxSupportedVersion()

static unsigned llvm::DWARFContext::getMaxSupportedVersion ( )
inlinestatic

Definition at line 399 of file DWARFContext.h.

Referenced by llvm::DWARFUnitHeader::extract(), and isSupportedVersion().

◆ getMaxVersion()

unsigned llvm::DWARFContext::getMaxVersion ( )
inline

Definition at line 273 of file DWARFContext.h.

References info_section_units().

Referenced by dump().

◆ getNormalUnitsVector()

const DWARFUnitVector & llvm::DWARFContext::getNormalUnitsVector ( )
inline

Definition at line 176 of file DWARFContext.h.

Referenced by llvm::DWARFVerifier::handleDebugInfo().

◆ getNumCompileUnits()

unsigned llvm::DWARFContext::getNumCompileUnits ( )
inline

Get the number of compile units in this context.

Definition at line 235 of file DWARFContext.h.

Referenced by dump().

◆ getNumDWOCompileUnits()

unsigned llvm::DWARFContext::getNumDWOCompileUnits ( )
inline

Get the number of compile units in the DWO context.

Definition at line 245 of file DWARFContext.h.

Referenced by dump().

◆ getNumDWOTypeUnits()

unsigned llvm::DWARFContext::getNumDWOTypeUnits ( )
inline

Get the number of type units in the DWO context.

Definition at line 250 of file DWARFContext.h.

Referenced by dump().

◆ getNumTypeUnits()

unsigned llvm::DWARFContext::getNumTypeUnits ( )
inline

Get the number of type units in this context.

Definition at line 240 of file DWARFContext.h.

Referenced by dump().

◆ getParseCUTUIndexManually()

bool llvm::DWARFContext::getParseCUTUIndexManually ( ) const
inline

Returns whether CU/TU should be populated manually.

TU Index populated manually only for DWARF5.

Definition at line 482 of file DWARFContext.h.

◆ getRecoverableErrorHandler()

function_ref< void(Error)> llvm::DWARFContext::getRecoverableErrorHandler ( )
inline

◆ getStringDWOExtractor()

DataExtractor llvm::DWARFContext::getStringDWOExtractor ( ) const
inline

◆ getStringExtractor()

DataExtractor llvm::DWARFContext::getStringExtractor ( ) const
inline

◆ getSupportedAddressSizes()

static SmallVector< uint8_t, 3 > llvm::DWARFContext::getSupportedAddressSizes ( )
inlinestatic

Definition at line 404 of file DWARFContext.h.

Referenced by checkAddressSizeSupported(), and isAddressSizeSupported().

◆ getTUIndex()

const DWARFUnitIndex & DWARFContext::getTUIndex ( )

Definition at line 1419 of file DWARFContext.cpp.

Referenced by dump(), and getTypeUnitForHash().

◆ getTypeUnitForHash()

DWARFTypeUnit * DWARFContext::getTypeUnitForHash ( uint16_t  Version,
uint64_t  Hash,
bool  IsDWO 
)

◆ getUnitAtIndex()

DWARFUnit * llvm::DWARFContext::getUnitAtIndex ( unsigned  index)
inline

Get the unit at the specified index.

Definition at line 255 of file DWARFContext.h.

◆ getWarningHandler()

function_ref< void(Error)> llvm::DWARFContext::getWarningHandler ( )
inline

Definition at line 434 of file DWARFContext.h.

Referenced by llvm::DWARFDebugAranges::generate().

◆ info_section_units()

unit_iterator_range llvm::DWARFContext::info_section_units ( )
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().

◆ isAddressSizeSupported()

static bool llvm::DWARFContext::isAddressSizeSupported ( unsigned  AddressSize)
inlinestatic

◆ isLittleEndian()

bool llvm::DWARFContext::isLittleEndian ( ) const
inline

◆ isSupportedVersion()

static bool llvm::DWARFContext::isSupportedVersion ( unsigned  version)
inlinestatic

Definition at line 400 of file DWARFContext.h.

References getMaxSupportedVersion().

Referenced by llvm::DWARFUnitHeader::extract().

◆ normal_units()

unit_iterator_range llvm::DWARFContext::normal_units ( )
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().

◆ operator=()

DWARFContext & llvm::DWARFContext::operator= ( DWARFContext )
delete

◆ setMaxVersionIfGreater()

void llvm::DWARFContext::setMaxVersionIfGreater ( unsigned  Version)
inline

Definition at line 285 of file DWARFContext.h.

◆ setParseCUTUIndexManually()

void llvm::DWARFContext::setParseCUTUIndexManually ( bool  PCUTU)
inline

Sets whether CU/TU should be populated manually.

TU Index populated manually only for DWARF5.

Definition at line 486 of file DWARFContext.h.

◆ types_section_units()

unit_iterator_range llvm::DWARFContext::types_section_units ( )
inline

◆ verify()

bool DWARFContext::verify ( raw_ostream OS,
DIDumpOptions  DumpOpts = {} 
)
overridevirtual

Friends And Related Function Documentation

◆ DWARFContextState

friend class DWARFContextState
friend

Definition at line 107 of file DWARFContext.h.


The documentation for this class was generated from the following files: