class DWARFFormValue

Declaration

class DWARFFormValue { /* full declaration omitted */ };

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:26

Method Overview

  • public DWARFFormValue(dwarf::Form F = llvm::dwarf::Form(0))
  • public static llvm::DWARFFormValue createFromBlockValue(dwarf::Form F, ArrayRef<uint8_t> D)
  • public static llvm::DWARFFormValue createFromPValue(dwarf::Form F, const char * V)
  • public static llvm::DWARFFormValue createFromSValue(dwarf::Form F, int64_t V)
  • public static llvm::DWARFFormValue createFromUValue(dwarf::Form F, uint64_t V)
  • public static llvm::DWARFFormValue createFromUnit(dwarf::Form F, const llvm::DWARFUnit * Unit, uint64_t * OffsetPtr)
  • public void dump(llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOpts = llvm::DIDumpOptions()) const
  • public static void dumpAddressSection(const llvm::DWARFObject & Obj, llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOpts, uint64_t SectionIndex)
  • public void dumpSectionedAddress(llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOpts, object::SectionedAddress SA) const
  • public bool extractValue(const llvm::DWARFDataExtractor & Data, uint64_t * OffsetPtr, dwarf::FormParams FormParams, const llvm::DWARFUnit * U)
  • public bool extractValue(const llvm::DWARFDataExtractor & Data, uint64_t * OffsetPtr, dwarf::FormParams FormParams, const llvm::DWARFContext * Context = nullptr, const llvm::DWARFUnit * Unit = nullptr)
  • public Optional<uint64_t> getAsAddress() const
  • public Optional<ArrayRef<uint8_t>> getAsBlock() const
  • public Optional<const char *> getAsCString() const
  • public Optional<uint64_t> getAsCStringOffset() const
  • public Optional<uint64_t> getAsReference() const
  • public Optional<uint64_t> getAsReferenceUVal() const
  • public Optional<llvm::DWARFFormValue::UnitOffset> getAsRelativeReference() const
  • public Optional<uint64_t> getAsSectionOffset() const
  • public Optional<object::SectionedAddress> getAsSectionedAddress() const
  • public Optional<int64_t> getAsSignedConstant() const
  • public Optional<uint64_t> getAsUnsignedConstant() const
  • public dwarf::Form getForm() const
  • public uint64_t getRawUValue() const
  • public const llvm::DWARFUnit * getUnit() const
  • public bool isFormClass(llvm::DWARFFormValue::FormClass FC) const
  • public bool isInlinedCStr() const
  • public bool skipValue(llvm::DataExtractor DebugInfoData, uint64_t * OffsetPtr, const dwarf::FormParams Params) const
  • public static bool skipValue(dwarf::Form Form, llvm::DataExtractor DebugInfoData, uint64_t * OffsetPtr, const dwarf::FormParams FormParams)

Methods

DWARFFormValue(
    dwarf::Form F = llvm::dwarf::Form(0))

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:65

Parameters

dwarf::Form F = llvm::dwarf::Form(0)

static llvm::DWARFFormValue createFromBlockValue(
    dwarf::Form F,
    ArrayRef<uint8_t> D)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:70

Parameters

dwarf::Form F
ArrayRef<uint8_t> D

static llvm::DWARFFormValue createFromPValue(
    dwarf::Form F,
    const char* V)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:69

Parameters

dwarf::Form F
const char* V

static llvm::DWARFFormValue createFromSValue(
    dwarf::Form F,
    int64_t V)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:67

Parameters

dwarf::Form F
int64_t V

static llvm::DWARFFormValue createFromUValue(
    dwarf::Form F,
    uint64_t V)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:68

Parameters

dwarf::Form F
uint64_t V

static llvm::DWARFFormValue createFromUnit(
    dwarf::Form F,
    const llvm::DWARFUnit* Unit,
    uint64_t* OffsetPtr)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:72

Parameters

dwarf::Form F
const llvm::DWARFUnit* Unit
uint64_t* OffsetPtr

void dump(llvm::raw_ostream& OS,
          llvm::DIDumpOptions DumpOpts =
              llvm::DIDumpOptions()) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:80

Parameters

llvm::raw_ostream& OS
llvm::DIDumpOptions DumpOpts = llvm::DIDumpOptions()

static void dumpAddressSection(
    const llvm::DWARFObject& Obj,
    llvm::raw_ostream& OS,
    llvm::DIDumpOptions DumpOpts,
    uint64_t SectionIndex)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:83

Parameters

const llvm::DWARFObject& Obj
llvm::raw_ostream& OS
llvm::DIDumpOptions DumpOpts
uint64_t SectionIndex

void dumpSectionedAddress(
    llvm::raw_ostream& OS,
    llvm::DIDumpOptions DumpOpts,
    object::SectionedAddress SA) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:81

Parameters

llvm::raw_ostream& OS
llvm::DIDumpOptions DumpOpts
object::SectionedAddress SA

bool extractValue(
    const llvm::DWARFDataExtractor& Data,
    uint64_t* OffsetPtr,
    dwarf::FormParams FormParams,
    const llvm::DWARFUnit* U)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:95

Parameters

const llvm::DWARFDataExtractor& Data
uint64_t* OffsetPtr
dwarf::FormParams FormParams
const llvm::DWARFUnit* U

bool extractValue(
    const llvm::DWARFDataExtractor& Data,
    uint64_t* OffsetPtr,
    dwarf::FormParams FormParams,
    const llvm::DWARFContext* Context = nullptr,
    const llvm::DWARFUnit* Unit = nullptr)

Description

Extracts a value in \p Data at offset \p *OffsetPtr. The information in \p FormParams is needed to interpret some forms. The optional\p Context and \p Unit allows extracting information if the form refers to other sections (e.g., .debug_str).

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:90

Parameters

const llvm::DWARFDataExtractor& Data
uint64_t* OffsetPtr
dwarf::FormParams FormParams
const llvm::DWARFContext* Context = nullptr
const llvm::DWARFUnit* Unit = nullptr

Optional<uint64_t> getAsAddress() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:115

Optional<ArrayRef<uint8_t>> getAsBlock() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:118

Optional<const char*> getAsCString() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:114

Optional<uint64_t> getAsCStringOffset() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:119

Optional<uint64_t> getAsReference() const

Description

getAsFoo functions below return the extracted value as Foo if only DWARFFormValue has form class is suitable for representing Foo.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:106

Optional<uint64_t> getAsReferenceUVal() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:120

Optional<llvm::DWARFFormValue::UnitOffset>
getAsRelativeReference() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:111

Optional<uint64_t> getAsSectionOffset() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:117

Optional<object::SectionedAddress>
getAsSectionedAddress() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:116

Optional<int64_t> getAsSignedConstant() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:113

Optional<uint64_t> getAsUnsignedConstant() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:112

dwarf::Form getForm() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:75

uint64_t getRawUValue() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:76

const llvm::DWARFUnit* getUnit() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:79

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

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:78

Parameters

llvm::DWARFFormValue::FormClass FC

bool isInlinedCStr() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:100

bool skipValue(
    llvm::DataExtractor DebugInfoData,
    uint64_t* OffsetPtr,
    const dwarf::FormParams Params) const

Description

Skip a form's value in \p DebugInfoData at the offset specified by\p OffsetPtr. Skips the bytes for the current form and updates the offset.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:131

Parameters

llvm::DataExtractor DebugInfoData
The data where we want to skip the value.
uint64_t* OffsetPtr
A reference to the offset that will be updated.
const dwarf::FormParams Params
DWARF parameters to help interpret forms.

Returns

true on success, false if the form was not skipped.

static bool skipValue(
    dwarf::Form Form,
    llvm::DataExtractor DebugInfoData,
    uint64_t* OffsetPtr,
    const dwarf::FormParams FormParams)

Description

Skip a form's value in \p DebugInfoData at the offset specified by\p OffsetPtr. Skips the bytes for the specified form and updates the offset.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:146

Parameters

dwarf::Form Form
The DW_FORM enumeration that indicates the form to skip.
llvm::DataExtractor DebugInfoData
The data where we want to skip the value.
uint64_t* OffsetPtr
A reference to the offset that will be updated.
const dwarf::FormParams FormParams
DWARF parameters to help interpret forms.

Returns

true on success, false if the form was not skipped.