LLDB  mainline
Public Member Functions | Private Attributes | List of all members
EntityVariable Class Reference

Represents an Entity constructed from a VariableSP. More...

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

Public Member Functions

 EntityVariable (lldb::VariableSP &variable_sp)
 
ConstString GetName () const override
 
lldb::ValueObjectSP SetupValueObject (ExecutionContextScope *scope) override
 Creates and returns ValueObject tied to this variable and prepares Entity for materialization. More...
 
llvm::Optional< uint64_t > GetByteSize (ExecutionContextScope *scope) const override
 Returns size in bytes of the type associated with this variable. More...
 
bool LocationExpressionIsValid () const override
 Returns 'true' if the location expression associated with this variable is valid. More...
 
llvm::Optional< size_t > GetTypeBitAlign (ExecutionContextScope *scope) const override
 Returns alignment of the type associated with this variable in bits. More...
 
- Public Member Functions inherited from EntityVariableBase
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)
 

Private Attributes

lldb::VariableSP m_variable_sp
 Variable that this entity is based on. More...
 

Additional Inherited Members

- Protected Attributes inherited from EntityVariableBase
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
 

Detailed Description

Represents an Entity constructed from a VariableSP.

This class is used for materialization of variables for which the user has a VariableSP on hand. The ValueObject is then derived from the associated DWARF location expression when needed by the Materializer.

Definition at line 804 of file Materializer.cpp.

Constructor & Destructor Documentation

◆ EntityVariable()

EntityVariable::EntityVariable ( lldb::VariableSP &  variable_sp)
inline

Definition at line 806 of file Materializer.cpp.

Member Function Documentation

◆ GetByteSize()

llvm::Optional<uint64_t> EntityVariable::GetByteSize ( ExecutionContextScope scope) const
inlineoverridevirtual

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 NoneType otherwise.

Implements EntityVariableBase.

Definition at line 819 of file Materializer.cpp.

◆ GetName()

ConstString EntityVariable::GetName ( ) const
inlineoverridevirtual

Implements EntityVariableBase.

Definition at line 811 of file Materializer.cpp.

◆ GetTypeBitAlign()

llvm::Optional<size_t> EntityVariable::GetTypeBitAlign ( ExecutionContextScope scope) const
inlineoverridevirtual

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 NoneType otherwise.

Implements EntityVariableBase.

Definition at line 828 of file Materializer.cpp.

◆ LocationExpressionIsValid()

bool EntityVariable::LocationExpressionIsValid ( ) const
inlineoverridevirtual

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

Implements EntityVariableBase.

Definition at line 823 of file Materializer.cpp.

◆ SetupValueObject()

lldb::ValueObjectSP EntityVariable::SetupValueObject ( ExecutionContextScope scope)
inlineoverridevirtual

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.

Implements EntityVariableBase.

Definition at line 813 of file Materializer.cpp.

References lldb_private::ValueObjectVariable::Create().

Member Data Documentation

◆ m_variable_sp

lldb::VariableSP EntityVariable::m_variable_sp
private

Variable that this entity is based on.

Definition at line 834 of file Materializer.cpp.


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