LLDB mainline
lldb_private::plugin::dwarf::DWARFFormValue Class Reference

#include <DWARFFormValue.h>

Public Types

enum  {
  eValueTypeInvalid = 0 , eValueTypeUnsigned , eValueTypeSigned , eValueTypeCStr ,
  eValueTypeBlock
}
typedef llvm::DWARFFormValue::ValueType ValueType

Public Member Functions

 DWARFFormValue ()=default
 DWARFFormValue (const DWARFUnit *unit)
 DWARFFormValue (const DWARFUnit *unit, dw_form_t form)
const DWARFUnitGetUnit () const
void SetUnit (const DWARFUnit *unit)
dw_form_t Form () const
dw_form_tFormRef ()
void SetForm (dw_form_t form)
const ValueTypeValue () const
ValueTypeValueRef ()
void SetValue (const ValueType &val)
void Dump (Stream &s) const
bool ExtractValue (const DWARFDataExtractor &data, lldb::offset_t *offset_ptr)
const uint8_t * BlockData () const
std::optional< uint8_t > GetFixedSize () const
DWARFDIE Reference () const
std::pair< DWARFUnit *, uint64_t > ReferencedUnitAndOffset () const
 If this is a reference to another DIE, return the corresponding DWARFUnit and DIE offset such that Unit->GetDIE(offset) produces the desired DIE.
uint64_t Reference (dw_offset_t offset) const
bool Boolean () const
uint64_t Unsigned () const
void SetUnsigned (uint64_t uval)
int64_t Signed () const
void SetSigned (int64_t sval)
const char * AsCString () const
dw_addr_t Address () const
bool IsValid () const
bool SkipValue (const DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr) const
void Clear ()
std::optional< uint64_t > getAsUnsignedConstant () const
std::optional< int64_t > getAsSignedConstant () const
const char * getAsCString () const

Static Public Member Functions

static std::optional< uint8_t > GetFixedSize (dw_form_t form, const DWARFUnit *u)
static bool SkipValue (const dw_form_t form, const DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr, const DWARFUnit *unit)
static bool IsBlockForm (const dw_form_t form)
static bool IsDataForm (const dw_form_t form)
static int Compare (const DWARFFormValue &a, const DWARFFormValue &b)
static bool FormIsSupported (dw_form_t form)

Protected Attributes

const DWARFUnitm_unit = nullptr
dw_form_t m_form = dw_form_t(0)
ValueType m_value

Detailed Description

Definition at line 22 of file DWARFFormValue.h.

Member Typedef Documentation

◆ ValueType

typedef llvm::DWARFFormValue::ValueType lldb_private::plugin::dwarf::DWARFFormValue::ValueType

Definition at line 24 of file DWARFFormValue.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eValueTypeInvalid 
eValueTypeUnsigned 
eValueTypeSigned 
eValueTypeCStr 
eValueTypeBlock 

Definition at line 25 of file DWARFFormValue.h.

Constructor & Destructor Documentation

◆ DWARFFormValue() [1/3]

lldb_private::plugin::dwarf::DWARFFormValue::DWARFFormValue ( )
default

Referenced by Compare().

◆ DWARFFormValue() [2/3]

lldb_private::plugin::dwarf::DWARFFormValue::DWARFFormValue ( const DWARFUnit * unit)
inline

Definition at line 34 of file DWARFFormValue.h.

References m_unit.

◆ DWARFFormValue() [3/3]

lldb_private::plugin::dwarf::DWARFFormValue::DWARFFormValue ( const DWARFUnit * unit,
dw_form_t form )
inline

Definition at line 35 of file DWARFFormValue.h.

References m_form, and m_unit.

Member Function Documentation

◆ Address()

◆ AsCString()

◆ BlockData()

◆ Boolean()

◆ Clear()

void DWARFFormValue::Clear ( )

Definition at line 25 of file DWARFFormValue.cpp.

References m_form, m_unit, and m_value.

Referenced by DWARFASTParserClang::ParseTypeModifier().

◆ Compare()

int lldb_private::plugin::dwarf::DWARFFormValue::Compare ( const DWARFFormValue & a,
const DWARFFormValue & b )
static

References DWARFFormValue().

◆ Dump()

◆ ExtractValue()

◆ Form()

◆ FormIsSupported()

bool DWARFFormValue::FormIsSupported ( dw_form_t form)
static

Definition at line 623 of file DWARFFormValue.cpp.

Referenced by GetUnsupportedForms().

◆ FormRef()

dw_form_t & lldb_private::plugin::dwarf::DWARFFormValue::FormRef ( )
inline

Definition at line 40 of file DWARFFormValue.h.

References m_form.

Referenced by ExtractAttrAndFormValue().

◆ getAsCString()

const char * lldb_private::plugin::dwarf::DWARFFormValue::getAsCString ( ) const
inline

Definition at line 83 of file DWARFFormValue.h.

References AsCString().

◆ getAsSignedConstant()

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

Definition at line 572 of file DWARFFormValue.cpp.

References IsDataForm(), m_form, and m_value.

◆ getAsUnsignedConstant()

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

Definition at line 566 of file DWARFFormValue.cpp.

References IsDataForm(), m_form, and m_value.

◆ GetFixedSize() [1/2]

std::optional< uint8_t > DWARFFormValue::GetFixedSize ( ) const

Definition at line 197 of file DWARFFormValue.cpp.

References GetFixedSize(), m_form, and m_unit.

Referenced by GetAttributes(), and GetFixedSize().

◆ GetFixedSize() [2/2]

std::optional< uint8_t > DWARFFormValue::GetFixedSize ( dw_form_t form,
const DWARFUnit * u )
static

◆ GetUnit()

const DWARFUnit * lldb_private::plugin::dwarf::DWARFFormValue::GetUnit ( ) const
inline

◆ IsBlockForm()

◆ IsDataForm()

bool DWARFFormValue::IsDataForm ( const dw_form_t form)
static

◆ IsValid()

◆ Reference() [1/2]

◆ Reference() [2/2]

uint64_t DWARFFormValue::Reference ( dw_offset_t offset) const

Definition at line 546 of file DWARFFormValue.cpp.

References DW_INVALID_OFFSET, m_form, and m_value.

◆ ReferencedUnitAndOffset()

std::pair< DWARFUnit *, uint64_t > DWARFFormValue::ReferencedUnitAndOffset ( ) const

If this is a reference to another DIE, return the corresponding DWARFUnit and DIE offset such that Unit->GetDIE(offset) produces the desired DIE.

Otherwise, a nullptr and unspecified offset are returned.

Definition at line 498 of file DWARFFormValue.cpp.

References lldb_private::plugin::dwarf::DIERef::DebugInfo, lldb_private::plugin::dwarf::DWARFTypeUnit::GetTypeOffset(), m_form, m_unit, and m_value.

Referenced by lldb_private::plugin::dwarf::DWARFUnit::PeekDIEName(), and Reference().

◆ SetForm()

void lldb_private::plugin::dwarf::DWARFFormValue::SetForm ( dw_form_t form)
inline

◆ SetSigned()

void lldb_private::plugin::dwarf::DWARFFormValue::SetSigned ( int64_t sval)
inline

Definition at line 64 of file DWARFFormValue.h.

References m_value.

Referenced by ExtractAttrAndFormValue().

◆ SetUnit()

void lldb_private::plugin::dwarf::DWARFFormValue::SetUnit ( const DWARFUnit * unit)
inline

◆ SetUnsigned()

void lldb_private::plugin::dwarf::DWARFFormValue::SetUnsigned ( uint64_t uval)
inline

Definition at line 62 of file DWARFFormValue.h.

References m_value.

◆ SetValue()

void lldb_private::plugin::dwarf::DWARFFormValue::SetValue ( const ValueType & val)
inline

◆ Signed()

◆ SkipValue() [1/2]

◆ SkipValue() [2/2]

◆ Unsigned()

◆ Value()

const ValueType & lldb_private::plugin::dwarf::DWARFFormValue::Value ( ) const
inline

Definition at line 42 of file DWARFFormValue.h.

References m_value.

Referenced by lldb_private::plugin::dwarf::DWARFAttributes::Append().

◆ ValueRef()

ValueType & lldb_private::plugin::dwarf::DWARFFormValue::ValueRef ( )
inline

Definition at line 43 of file DWARFFormValue.h.

References m_value.

Member Data Documentation

◆ m_form

◆ m_unit

const DWARFUnit* lldb_private::plugin::dwarf::DWARFFormValue::m_unit = nullptr
protected

◆ m_value


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