LLDB mainline
|
Base class for materialization of Variables and ValueObjects. More...
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. | |
virtual llvm::Expected< uint64_t > | GetByteSize (ExecutionContextScope *scope) const =0 |
Returns size in bytes of the type associated with this variable. | |
virtual bool | LocationExpressionIsValid () const =0 |
Returns 'true' if the location expression associated with this variable is valid. | |
virtual std::optional< size_t > | GetTypeBitAlign (ExecutionContextScope *scope) const =0 |
Returns alignment of the type associated with this variable in bits. |
Base class for materialization of Variables and ValueObjects.
Subclasses specify how to obtain the Value which is to be materialized.
Definition at line 436 of file Materializer.cpp.
|
virtualdefault |
|
inline |
Definition at line 440 of file Materializer.cpp.
References g_default_var_alignment, g_default_var_byte_size, lldb_private::Materializer::Entity::m_alignment, and lldb_private::Materializer::Entity::m_size.
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 609 of file Materializer.cpp.
References lldb_private::Status::AsCString(), lldb_private::Expressions, lldb_private::IRMemoryMap::Free(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::IRMemoryMap::GetBestExecutionContextScope(), lldb_private::DataExtractor::GetByteSize(), lldb_private::DataExtractor::GetDataStart(), lldb_private::GetLog(), lldb_private::IRMemoryMap::GetMemoryData(), GetName(), LLDB_INVALID_ADDRESS, LLDB_LOGF, lldb_private::Materializer::Entity::m_offset, m_original_data, m_temporary_allocation, m_temporary_allocation_size, SetupValueObject(), and lldb_private::Status::Success().
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 692 of file Materializer.cpp.
References lldb_private::DumpHexBytes(), lldb_private::DataExtractor::GetAddress(), lldb_private::IRMemoryMap::GetAddressByteSize(), lldb_private::IRMemoryMap::GetByteOrder(), lldb_private::WritableDataBuffer::GetBytes(), lldb_private::DataBufferHeap::GetByteSize(), lldb_private::StreamString::GetString(), LLDB_INVALID_ADDRESS, lldb_private::Materializer::Entity::m_offset, lldb_private::Materializer::Entity::m_size, m_temporary_allocation, m_temporary_allocation_size, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), lldb_private::Log::PutString(), lldb_private::IRMemoryMap::ReadMemory(), and lldb_private::Status::Success().
|
privatepure virtual |
Returns size in bytes of the type associated with this variable.
Implemented in EntityValueObject, and EntityVariable.
Referenced by Materialize().
|
privatepure virtual |
Implemented in EntityValueObject, and EntityVariable.
|
privatepure virtual |
Returns alignment of the type associated with this variable in bits.
Implemented in EntityValueObject, and EntityVariable.
Referenced by Materialize().
|
privatepure virtual |
Returns 'true' if the location expression associated with this variable is valid.
Implemented in EntityValueObject, and EntityVariable.
Referenced by Materialize().
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 447 of file Materializer.cpp.
References lldb_private::Status::AsCString(), lldb_private::IRMemoryMap::eAllocationPolicyMirror, lldb_private::Expressions, lldb_private::Status::Fail(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::DataExtractor::GetAddress(), lldb_private::IRMemoryMap::GetBestExecutionContextScope(), GetByteSize(), lldb_private::DataExtractor::GetByteSize(), lldb_private::DataExtractor::GetDataStart(), lldb_private::Status::GetError(), lldb_private::GetLog(), GetName(), GetTypeBitAlign(), LLDB_INVALID_ADDRESS, LLDB_LOGF, LocationExpressionIsValid(), m_is_reference, lldb_private::Materializer::Entity::m_offset, m_original_data, m_temporary_allocation, m_temporary_allocation_size, lldb_private::IRMemoryMap::Malloc(), SetupValueObject(), lldb_private::Status::Success(), lldb_private::toString(), lldb_private::IRMemoryMap::WriteMemory(), and lldb_private::IRMemoryMap::WritePointerToMemory().
|
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.
Referenced by Dematerialize(), and Materialize().
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 754 of file Materializer.cpp.
References lldb_private::IRMemoryMap::Free(), LLDB_INVALID_ADDRESS, m_temporary_allocation, and m_temporary_allocation_size.
|
protected |
Definition at line 802 of file Materializer.cpp.
Referenced by EntityVariable::EntityVariable(), Materialize(), and EntityValueObject::SetupValueObject().
|
protected |
Definition at line 805 of file Materializer.cpp.
Referenced by Dematerialize(), and Materialize().
|
protected |
Definition at line 803 of file Materializer.cpp.
Referenced by Dematerialize(), DumpToLog(), Materialize(), and Wipe().
|
protected |
Definition at line 804 of file Materializer.cpp.
Referenced by Dematerialize(), DumpToLog(), Materialize(), and Wipe().