LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DWARFFormValue Class Reference

#include <DWARFFormValue.h>

Collaboration diagram for DWARFFormValue:
Collaboration graph
[legend]

Classes

struct  ValueTypeTag
 

Public Types

enum  {
  eValueTypeInvalid = 0, eValueTypeUnsigned, eValueTypeSigned, eValueTypeCStr,
  eValueTypeBlock
}
 
typedef struct DWARFFormValue::ValueTypeTag 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 (lldb_private::Stream &s) const
 
bool ExtractValue (const lldb_private::DWARFDataExtractor &data, lldb::offset_t *offset_ptr)
 
const uint8_t * BlockData () const
 
llvm::Optional< uint8_t > GetFixedSize () const
 
DWARFDIE Reference () const
 
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 lldb_private::DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr) const
 
void Clear ()
 

Static Public Member Functions

static llvm::Optional< uint8_t > GetFixedSize (dw_form_t form, const DWARFUnit *u)
 
static bool SkipValue (const dw_form_t form, const lldb_private::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 = 0
 
ValueType m_value
 

Detailed Description

Definition at line 20 of file DWARFFormValue.h.

Member Typedef Documentation

◆ ValueType

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eValueTypeInvalid 
eValueTypeUnsigned 
eValueTypeSigned 
eValueTypeCStr 
eValueTypeBlock 

Definition at line 33 of file DWARFFormValue.h.

Constructor & Destructor Documentation

◆ DWARFFormValue() [1/3]

DWARFFormValue::DWARFFormValue ( )
default

◆ DWARFFormValue() [2/3]

DWARFFormValue::DWARFFormValue ( const DWARFUnit unit)
inline

Definition at line 42 of file DWARFFormValue.h.

◆ DWARFFormValue() [3/3]

DWARFFormValue::DWARFFormValue ( const DWARFUnit unit,
dw_form_t  form 
)
inline

Definition at line 43 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 DWARFFormValue::Boolean ( ) const
inline

◆ Clear()

void DWARFFormValue::Clear ( )

Definition at line 24 of file DWARFFormValue.cpp.

Referenced by DWARFASTParserClang::ParseTypeModifier().

◆ Compare()

static int DWARFFormValue::Compare ( const DWARFFormValue a,
const DWARFFormValue b 
)
static

◆ Dump()

void DWARFFormValue::Dump ( lldb_private::Stream s) const

◆ ExtractValue()

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

◆ Form()

dw_form_t DWARFFormValue::Form ( ) const
inline

◆ FormIsSupported()

bool DWARFFormValue::FormIsSupported ( dw_form_t  form)
static

◆ FormRef()

dw_form_t& DWARFFormValue::FormRef ( )
inline

Definition at line 48 of file DWARFFormValue.h.

References m_form.

Referenced by DWARFAbbreviationDeclaration::GetAttrAndFormValueByIndex().

◆ GetFixedSize() [1/2]

llvm::Optional< uint8_t > DWARFFormValue::GetFixedSize ( ) const

◆ GetFixedSize() [2/2]

llvm::Optional< uint8_t > DWARFFormValue::GetFixedSize ( dw_form_t  form,
const DWARFUnit u 
)
static

Definition at line 190 of file DWARFFormValue.cpp.

References g_form_sizes, DWARFUnit::GetAddressByteSize(), and FormSize::size.

◆ GetUnit()

const DWARFUnit* DWARFFormValue::GetUnit ( ) const
inline

Definition at line 45 of file DWARFFormValue.h.

References m_unit.

Referenced by DWARFAttributes::Append(), and SymbolFileDWARF::ParseVariableDIE().

◆ IsBlockForm()

bool DWARFFormValue::IsBlockForm ( const dw_form_t  form)
static

◆ IsDataForm()

bool DWARFFormValue::IsDataForm ( const dw_form_t  form)
static

◆ IsValid()

bool 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 546 of file DWARFFormValue.cpp.

References DW_INVALID_OFFSET.

◆ SetForm()

void DWARFFormValue::SetForm ( dw_form_t  form)
inline

◆ SetSigned()

void DWARFFormValue::SetSigned ( int64_t  sval)
inline

◆ SetUnit()

void DWARFFormValue::SetUnit ( const DWARFUnit unit)
inline

◆ SetUnsigned()

void DWARFFormValue::SetUnsigned ( uint64_t  uval)
inline

◆ SetValue()

void DWARFFormValue::SetValue ( const ValueType val)
inline

Definition at line 52 of file DWARFFormValue.h.

References m_value.

Referenced by DWARFAttributes::ExtractFormValueAtIndex().

◆ Signed()

int64_t DWARFFormValue::Signed ( ) const
inline

◆ SkipValue() [1/2]

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

◆ SkipValue() [2/2]

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

◆ Unsigned()

uint64_t DWARFFormValue::Unsigned ( ) const
inline

◆ Value()

const ValueType& DWARFFormValue::Value ( ) const
inline

Definition at line 50 of file DWARFFormValue.h.

References m_value.

Referenced by DWARFAttributes::Append().

◆ ValueRef()

ValueType& DWARFFormValue::ValueRef ( )
inline

Definition at line 51 of file DWARFFormValue.h.

References m_value.

Referenced by DWARFAbbreviationDeclaration::GetAttrAndFormValueByIndex().

Member Data Documentation

◆ m_form

dw_form_t DWARFFormValue::m_form = 0
protected

Definition at line 86 of file DWARFFormValue.h.

Referenced by Form(), FormRef(), IsValid(), and SetForm().

◆ m_unit

const DWARFUnit* DWARFFormValue::m_unit = nullptr
protected

Definition at line 85 of file DWARFFormValue.h.

Referenced by GetUnit(), and SetUnit().

◆ m_value

ValueType DWARFFormValue::m_value
protected

Definition at line 87 of file DWARFFormValue.h.

Referenced by Boolean(), SetSigned(), SetUnsigned(), SetValue(), Signed(), Unsigned(), Value(), and ValueRef().


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