LLDB  mainline
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
EntityVariableBase Class Referenceabstract

Base class for materialization of Variables and ValueObjects. More...

Inheritance diagram for EntityVariableBase:
Inheritance graph
[legend]
Collaboration diagram for EntityVariableBase:
Collaboration graph
[legend]

Public Member Functions

virtual ~EntityVariableBase ()=default
 
 EntityVariableBase ()
 
void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err) override
 
void Dematerialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Status &err) override
 
void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
 
void Wipe (IRMemoryMap &map, lldb::addr_t process_address) override
 
- Public Member Functions inherited from lldb_private::Materializer::Entity
 Entity ()=default
 
virtual ~Entity ()=default
 
uint32_t GetAlignment ()
 
uint32_t GetSize ()
 
uint32_t GetOffset ()
 
void SetOffset (uint32_t offset)
 

Protected Attributes

bool m_is_reference = false
 
lldb::addr_t m_temporary_allocation = LLDB_INVALID_ADDRESS
 
size_t m_temporary_allocation_size = 0
 
lldb::DataBufferSP m_original_data
 
- Protected Attributes inherited from lldb_private::Materializer::Entity
uint32_t m_alignment = 1
 
uint32_t m_size = 0
 
uint32_t m_offset = 0
 

Private Member Functions

virtual ConstString GetName () const =0
 
virtual lldb::ValueObjectSP SetupValueObject (ExecutionContextScope *scope)=0
 Creates and returns ValueObject tied to this variable and prepares Entity for materialization. More...
 
virtual std::optional< uint64_t > GetByteSize (ExecutionContextScope *scope) const =0
 Returns size in bytes of the type associated with this variable. More...
 
virtual bool LocationExpressionIsValid () const =0
 Returns 'true' if the location expression associated with this variable is valid. More...
 
virtual std::optional< size_t > GetTypeBitAlign (ExecutionContextScope *scope) const =0
 Returns alignment of the type associated with this variable in bits. More...
 

Detailed Description

Base class for materialization of Variables and ValueObjects.

Subclasses specify how to obtain the Value which is to be materialized.

Definition at line 429 of file Materializer.cpp.

Constructor & Destructor Documentation

◆ ~EntityVariableBase()

virtual EntityVariableBase::~EntityVariableBase ( )
virtualdefault

◆ EntityVariableBase()

EntityVariableBase::EntityVariableBase ( )
inline

Definition at line 433 of file Materializer.cpp.

References g_default_var_alignment, and g_default_var_byte_size.

Member Function Documentation

◆ Dematerialize()

void EntityVariableBase::Dematerialize ( lldb::StackFrameSP &  frame_sp,
IRMemoryMap map,
lldb::addr_t  process_address,
lldb::addr_t  frame_top,
lldb::addr_t  frame_bottom,
Status err 
)
inlineoverridevirtual

◆ DumpToLog()

void EntityVariableBase::DumpToLog ( IRMemoryMap map,
lldb::addr_t  process_address,
Log log 
)
inlineoverridevirtual

◆ GetByteSize()

virtual std::optional<uint64_t> EntityVariableBase::GetByteSize ( ExecutionContextScope scope) const
privatepure virtual

Returns size in bytes of the type associated with this variable.

Returns
On success, returns byte size of the type associated with this variable. Returns std::nullopt otherwise.

Implemented in EntityValueObject, and EntityVariable.

◆ GetName()

virtual ConstString EntityVariableBase::GetName ( ) const
privatepure virtual

Implemented in EntityValueObject, and EntityVariable.

◆ GetTypeBitAlign()

virtual std::optional<size_t> EntityVariableBase::GetTypeBitAlign ( ExecutionContextScope scope) const
privatepure virtual

Returns alignment of the type associated with this variable in bits.

Returns
On success, returns alignment in bits for the type associated with this variable. Returns std::nullopt otherwise.

Implemented in EntityValueObject, and EntityVariable.

◆ LocationExpressionIsValid()

virtual bool EntityVariableBase::LocationExpressionIsValid ( ) const
privatepure virtual

Returns 'true' if the location expression associated with this variable is valid.

Implemented in EntityValueObject, and EntityVariable.

◆ Materialize()

void EntityVariableBase::Materialize ( lldb::StackFrameSP &  frame_sp,
IRMemoryMap map,
lldb::addr_t  process_address,
Status err 
)
inlineoverridevirtual

◆ SetupValueObject()

virtual lldb::ValueObjectSP EntityVariableBase::SetupValueObject ( ExecutionContextScope scope)
privatepure virtual

Creates and returns ValueObject tied to this variable and prepares Entity for materialization.

Called each time the Materializer (de)materializes a variable. We re-create the ValueObject based on the current ExecutionContextScope since clients such as conditional breakpoints may materialize the same EntityVariable multiple times with different frames.

Each subsequent use of the EntityVariableBase interface will query the newly created ValueObject until this function is called again.

Implemented in EntityValueObject, and EntityVariable.

◆ Wipe()

void EntityVariableBase::Wipe ( IRMemoryMap map,
lldb::addr_t  process_address 
)
inlineoverridevirtual

Member Data Documentation

◆ m_is_reference

bool EntityVariableBase::m_is_reference = false
protected

Definition at line 793 of file Materializer.cpp.

◆ m_original_data

lldb::DataBufferSP EntityVariableBase::m_original_data
protected

Definition at line 796 of file Materializer.cpp.

◆ m_temporary_allocation

lldb::addr_t EntityVariableBase::m_temporary_allocation = LLDB_INVALID_ADDRESS
protected

Definition at line 794 of file Materializer.cpp.

◆ m_temporary_allocation_size

size_t EntityVariableBase::m_temporary_allocation_size = 0
protected

Definition at line 795 of file Materializer.cpp.


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