LLDB mainline
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
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

◆ DWARFFormValue() [2/3]

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

Definition at line 34 of file DWARFFormValue.h.

◆ 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.

Member Function Documentation

◆ Address()

dw_addr_t DWARFFormValue::Address ( ) const

◆ AsCString()

const char * DWARFFormValue::AsCString ( ) const

◆ BlockData()

const uint8_t * DWARFFormValue::BlockData ( ) const

◆ Boolean()

bool lldb_private::plugin::dwarf::DWARFFormValue::Boolean ( ) const
inline

◆ 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()

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

◆ Dump()

void DWARFFormValue::Dump ( Stream s) const

◆ ExtractValue()

bool DWARFFormValue::ExtractValue ( const DWARFDataExtractor data,
lldb::offset_t offset_ptr 
)

◆ Form()

dw_form_t lldb_private::plugin::dwarf::DWARFFormValue::Form ( ) const
inline

◆ FormIsSupported()

bool DWARFFormValue::FormIsSupported ( dw_form_t  form)
static

Definition at line 634 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 583 of file DWARFFormValue.cpp.

References IsDataForm(), m_form, and m_value.

◆ getAsUnsignedConstant()

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

Definition at line 577 of file DWARFFormValue.cpp.

References IsDataForm(), m_form, and m_value.

◆ GetFixedSize() [1/2]

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

◆ 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()

bool DWARFFormValue::IsBlockForm ( const dw_form_t  form)
static

◆ IsDataForm()

bool DWARFFormValue::IsDataForm ( const dw_form_t  form)
static

◆ IsValid()

bool lldb_private::plugin::dwarf::DWARFFormValue::IsValid ( ) const
inline

◆ Reference() [1/2]

DWARFDIE DWARFFormValue::Reference ( ) const

◆ Reference() [2/2]

uint64_t DWARFFormValue::Reference ( dw_offset_t  offset) const

Definition at line 557 of file DWARFFormValue.cpp.

References DW_INVALID_OFFSET, m_form, and m_value.

◆ ReferencedUnitAndOffset()

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

◆ 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()

int64_t lldb_private::plugin::dwarf::DWARFFormValue::Signed ( ) const
inline

◆ SkipValue() [1/2]

bool DWARFFormValue::SkipValue ( const dw_form_t  form,
const DWARFDataExtractor debug_info_data,
lldb::offset_t offset_ptr,
const DWARFUnit unit 
)
static

◆ SkipValue() [2/2]

bool DWARFFormValue::SkipValue ( const DWARFDataExtractor debug_info_data,
lldb::offset_t offset_ptr 
) const

◆ Unsigned()

uint64_t lldb_private::plugin::dwarf::DWARFFormValue::Unsigned ( ) const
inline

◆ 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

dw_form_t lldb_private::plugin::dwarf::DWARFFormValue::m_form = dw_form_t(0)
protected

◆ m_unit

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

◆ m_value

ValueType lldb_private::plugin::dwarf::DWARFFormValue::m_value
protected

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