LLVM: llvm::DWARFFormValue Class Reference (original) (raw)

#include "[llvm/DebugInfo/DWARF/DWARFFormValue.h](DWARFFormValue%5F8h%5Fsource.html)"

Public Member Functions
DWARFFormValue (dwarf::Form F=dwarf::Form(0))
dwarf::Form getForm () const
uint64_t getRawUValue () const
LLVM_ABI bool isFormClass (FormClass FC) const
const DWARFUnit * getUnit () const
LLVM_ABI void dump (raw_ostream &OS, DIDumpOptions DumpOpts=DIDumpOptions()) const
LLVM_ABI void dumpSectionedAddress (raw_ostream &OS, DIDumpOptions DumpOpts, object::SectionedAddress SA) const
LLVM_ABI void dumpAddress (raw_ostream &OS, uint64_t Address) const
LLVM_ABI bool extractValue (const DWARFDataExtractor &Data, uint64_t *OffsetPtr, dwarf::FormParams FormParams, const DWARFContext *Context=nullptr, const DWARFUnit *Unit=nullptr)
Extracts a value in Data at offset *OffsetPtr.
bool extractValue (const DWARFDataExtractor &Data, uint64_t *OffsetPtr, dwarf::FormParams FormParams, const DWARFUnit *U)
LLVM_ABI std::optional< uint64_t > getAsRelativeReference () const
getAsFoo functions below return the extracted value as Foo if only DWARFFormValue has form class is suitable for representing Foo.
LLVM_ABI std::optional< uint64_t > getAsDebugInfoReference () const
LLVM_ABI std::optional< uint64_t > getAsSignatureReference () const
LLVM_ABI std::optional< uint64_t > getAsSupplementaryReference () const
LLVM_ABI std::optional< uint64_t > getAsUnsignedConstant () const
LLVM_ABI std::optional< int64_t > getAsSignedConstant () const
LLVM_ABI Expected< const char * > getAsCString () const
LLVM_ABI std::optional< uint64_t > getAsAddress () const
LLVM_ABI std::optional< object::SectionedAddress > getAsSectionedAddress () const
LLVM_ABI std::optional< uint64_t > getAsSectionOffset () const
LLVM_ABI std::optional< ArrayRef< uint8_t > > getAsBlock () const
LLVM_ABI std::optional< uint64_t > getAsCStringOffset () const
LLVM_ABI std::optional< uint64_t > getAsReferenceUVal () const
LLVM_ABI std::optional< std::string > getAsFile (DILineInfoSpecifier::FileLineInfoKind Kind) const
Correctly extract any file paths from a form value.
bool skipValue (DataExtractor DebugInfoData, uint64_t *OffsetPtr, const dwarf::FormParams Params) const
Skip a form's value in DebugInfoData at the offset specified by OffsetPtr.
Static Public Member Functions
static LLVM_ABI DWARFFormValue createFromSValue (dwarf::Form F, int64_t V)
static LLVM_ABI DWARFFormValue createFromUValue (dwarf::Form F, uint64_t V)
static LLVM_ABI DWARFFormValue createFromPValue (dwarf::Form F, const char *V)
static LLVM_ABI DWARFFormValue createFromBlockValue (dwarf::Form F, ArrayRef< uint8_t > D)
static LLVM_ABI DWARFFormValue createFromUnit (dwarf::Form F, const DWARFUnit *Unit, uint64_t *OffsetPtr)
static LLVM_ABI std::optional< object::SectionedAddress > getAsSectionedAddress (const ValueType &Val, const dwarf::Form Form, const DWARFUnit *U)
static LLVM_ABI void dumpAddress (raw_ostream &OS, uint8_t AddressSize, uint64_t Address)
static LLVM_ABI void dumpAddressSection (const DWARFObject &Obj, raw_ostream &OS, DIDumpOptions DumpOpts, uint64_t SectionIndex)
static LLVM_ABI bool skipValue (dwarf::Form Form, DataExtractor DebugInfoData, uint64_t *OffsetPtr, const dwarf::FormParams FormParams)
Skip a form's value in DebugInfoData at the offset specified by OffsetPtr.

Definition at line 27 of file DWARFFormValue.h.

FormClass

Enumerator
FC_Unknown
FC_Address
FC_Block
FC_Constant
FC_String
FC_Flag
FC_Reference
FC_Indirect
FC_SectionOffset
FC_Exprloc

Definition at line 29 of file DWARFFormValue.h.

createFromBlockValue()

createFromPValue()

createFromSValue()

createFromUnit()

createFromUValue()

dump()

Definition at line 382 of file DWARFFormValue.cpp.

References A(), llvm::Address, dumpSectionedAddress(), llvm::format(), llvm::WithColor::get(), getAsSectionedAddress(), llvm::dwarf::getDwarfOffsetByteSize(), llvm::nulls(), llvm::Offset, llvm::DIDumpOptions::ShowAddresses, llvm::DIDumpOptions::Verbose, and llvm::raw_ostream::write_escaped().

Referenced by llvm::DWARFDebugLine::Prologue::dump(), dumpAttribute(), and dumpLocationList().

dumpAddress() [1/2]

dumpAddress() [2/2]

dumpAddressSection()

dumpSectionedAddress()

extractValue() [1/2]

Extracts a value in Data at offset *OffsetPtr.

The information in FormParams is needed to interpret some forms. The optional Context and Unit allows extracting information if the form refers to other sections (e.g., .debug_str).

Definition at line 220 of file DWARFFormValue.cpp.

References llvm::Data, llvm::errorToBool(), FP, llvm_unreachable, Size, and llvm::Error::success().

Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::clone(), createFromUnit(), extractValue(), llvm::DWARFAbbreviationDeclaration::getAttributeValueFromOffset(), llvm::dwarf_linker::parallel::DependencyTracker::maybeAddReferencedRoots(), and llvm::AppleAcceleratorTable::readAtoms().

extractValue() [2/2]

getAsAddress()

std::optional< uint64_t > DWARFFormValue::getAsAddress ( ) const

getAsBlock()

getAsCString()

getAsCStringOffset()

std::optional< uint64_t > DWARFFormValue::getAsCStringOffset ( ) const

getAsDebugInfoReference()

std::optional< uint64_t > DWARFFormValue::getAsDebugInfoReference ( ) const

getAsFile()

getAsReferenceUVal()

std::optional< uint64_t > DWARFFormValue::getAsReferenceUVal ( ) const

getAsRelativeReference()

std::optional< uint64_t > DWARFFormValue::getAsRelativeReference ( ) const

getAsSectionedAddress() [1/2]

getAsSectionedAddress() [2/2]

getAsSectionOffset()

std::optional< uint64_t > DWARFFormValue::getAsSectionOffset ( ) const

getAsSignatureReference()

std::optional< uint64_t > DWARFFormValue::getAsSignatureReference ( ) const

getAsSignedConstant()

std::optional< int64_t > DWARFFormValue::getAsSignedConstant ( ) const

getAsSupplementaryReference()

std::optional< uint64_t > DWARFFormValue::getAsSupplementaryReference ( ) const

getAsUnsignedConstant()

std::optional< uint64_t > DWARFFormValue::getAsUnsignedConstant ( ) const

getForm()

dwarf::Form llvm::DWARFFormValue::getForm ( ) const inline

getRawUValue()

uint64_t llvm::DWARFFormValue::getRawUValue ( ) const inline

getUnit()

isFormClass()

bool DWARFFormValue::isFormClass ( DWARFFormValue::FormClass FC ) const

Definition at line 216 of file DWARFFormValue.cpp.

References llvm::dwarf::doesFormBelongToClass().

Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneBlockAttr(), dumpAttribute(), dumpLocationExpr(), dumpLocationList(), getAsBlock(), getAsCString(), getAsCStringOffset(), getAsFile(), getAsReferenceUVal(), getAsSectionOffset(), getAsSignedConstant(), getAsUnsignedConstant(), llvm::dwarf_linker::parallel::DependencyTracker::maybeAddReferencedRoots(), and llvm::AppleAcceleratorTable::validateForms().

skipValue() [1/2]

skipValue() [2/2]


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