LLDB mainline
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
lldb_private::Materializer Class Reference

#include <Materializer.h>

Classes

class  Dematerializer
 
class  Entity
 
class  PersistentVariableDelegate
 

Public Types

typedef std::shared_ptr< DematerializerDematerializerSP
 
typedef std::weak_ptr< DematerializerDematerializerWP
 

Public Member Functions

 Materializer ()=default
 
 ~Materializer ()
 
DematerializerSP Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err)
 
uint32_t AddPersistentVariable (lldb::ExpressionVariableSP &persistent_variable_sp, PersistentVariableDelegate *delegate, Status &err)
 
uint32_t AddVariable (lldb::VariableSP &variable_sp, Status &err)
 
uint32_t AddValueObject (ConstString name, ValueObjectProviderTy valobj_provider, Status &err)
 Create entity from supplied ValueObject and count it as a member of the materialized struct.
 
uint32_t AddResultVariable (const CompilerType &type, bool is_lvalue, bool keep_in_memory, PersistentVariableDelegate *delegate, Status &err)
 
uint32_t AddSymbol (const Symbol &symbol_sp, Status &err)
 
uint32_t AddRegister (const RegisterInfo &register_info, Status &err)
 
uint32_t GetStructAlignment ()
 
uint32_t GetStructByteSize ()
 

Private Types

typedef std::unique_ptr< EntityEntityUP
 
typedef std::vector< EntityUPEntityVector
 

Private Member Functions

uint32_t AddStructMember (Entity &entity)
 

Private Attributes

DematerializerWP m_dematerializer_wp
 
EntityVector m_entities
 
uint32_t m_current_offset = 0
 
uint32_t m_struct_alignment = 8
 

Detailed Description

Definition at line 23 of file Materializer.h.

Member Typedef Documentation

◆ DematerializerSP

Definition at line 64 of file Materializer.h.

◆ DematerializerWP

Definition at line 65 of file Materializer.h.

◆ EntityUP

typedef std::unique_ptr<Entity> lldb_private::Materializer::EntityUP
private

Definition at line 147 of file Materializer.h.

◆ EntityVector

typedef std::vector<EntityUP> lldb_private::Materializer::EntityVector
private

Definition at line 148 of file Materializer.h.

Constructor & Destructor Documentation

◆ Materializer()

lldb_private::Materializer::Materializer ( )
default

◆ ~Materializer()

Materializer::~Materializer ( )

Definition at line 1505 of file Materializer.cpp.

References m_dematerializer_wp.

Member Function Documentation

◆ AddPersistentVariable()

uint32_t Materializer::AddPersistentVariable ( lldb::ExpressionVariableSP persistent_variable_sp,
PersistentVariableDelegate delegate,
Status err 
)

Definition at line 414 of file Materializer.cpp.

References AddStructMember(), and m_entities.

◆ AddRegister()

uint32_t Materializer::AddRegister ( const RegisterInfo register_info,
Status err 
)

Definition at line 1496 of file Materializer.cpp.

References AddStructMember(), and m_entities.

◆ AddResultVariable()

uint32_t Materializer::AddResultVariable ( const CompilerType type,
bool  is_lvalue,
bool  keep_in_memory,
PersistentVariableDelegate delegate,
Status err 
)

Definition at line 1198 of file Materializer.cpp.

References AddStructMember(), and m_entities.

◆ AddStructMember()

uint32_t Materializer::AddStructMember ( Entity entity)
private

◆ AddSymbol()

uint32_t Materializer::AddSymbol ( const Symbol symbol_sp,
Status err 
)

Definition at line 1321 of file Materializer.cpp.

References AddStructMember(), and m_entities.

◆ AddValueObject()

uint32_t Materializer::AddValueObject ( ConstString  name,
ValueObjectProviderTy  valobj_provider,
Status err 
)

Create entity from supplied ValueObject and count it as a member of the materialized struct.

Behaviour is undefined if 'valobj_provider' is empty.

Parameters
[in]nameName of variable to materialize
[in]valobj_providerWhen materializing values multiple times, this callback gets used to fetch a fresh ValueObject corresponding to the supplied frame. This is mainly used for conditional breakpoints that re-apply an expression whatever the frame happens to be when the breakpoint got hit.
[out]errError status that gets set on error.
Returns
Offset in bytes of the member we just added to the materialized struct.

Definition at line 900 of file Materializer.cpp.

References AddStructMember(), and m_entities.

◆ AddVariable()

uint32_t Materializer::AddVariable ( lldb::VariableSP variable_sp,
Status err 
)

Definition at line 892 of file Materializer.cpp.

References AddStructMember(), and m_entities.

◆ GetStructAlignment()

uint32_t lldb_private::Materializer::GetStructAlignment ( )
inline

Definition at line 110 of file Materializer.h.

References m_struct_alignment.

◆ GetStructByteSize()

uint32_t lldb_private::Materializer::GetStructByteSize ( )
inline

Definition at line 112 of file Materializer.h.

References m_current_offset.

◆ Materialize()

Materializer::DematerializerSP Materializer::Materialize ( lldb::StackFrameSP frame_sp,
IRMemoryMap map,
lldb::addr_t  process_address,
Status err 
)

Member Data Documentation

◆ m_current_offset

uint32_t lldb_private::Materializer::m_current_offset = 0
private

Definition at line 152 of file Materializer.h.

Referenced by AddStructMember(), and GetStructByteSize().

◆ m_dematerializer_wp

DematerializerWP lldb_private::Materializer::m_dematerializer_wp
private

Definition at line 150 of file Materializer.h.

Referenced by Materialize(), and ~Materializer().

◆ m_entities

EntityVector lldb_private::Materializer::m_entities
private

◆ m_struct_alignment

uint32_t lldb_private::Materializer::m_struct_alignment = 8
private

Definition at line 153 of file Materializer.h.

Referenced by AddStructMember(), and GetStructAlignment().


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