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 |
virtual void | Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err)=0 |
virtual 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)=0 |
virtual void | DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log)=0 |
virtual void | Wipe (IRMemoryMap &map, lldb::addr_t process_address)=0 |
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 std::optional< 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 429 of file Materializer.cpp.
|
virtualdefault |
|
inline |
Definition at line 433 of file Materializer.cpp.
References g_default_var_alignment, and g_default_var_byte_size.
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 602 of file Materializer.cpp.
References lldb_private::Status::AsCString(), lldb_private::IRMemoryMap::Free(), 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::Status::SetErrorStringWithFormat(), and lldb_private::Status::Success().
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 683 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::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 EntityVariable, and EntityValueObject.
|
privatepure virtual |
Implemented in EntityVariable, and EntityValueObject.
|
privatepure virtual |
Returns alignment of the type associated with this variable in bits.
Implemented in EntityVariable, and EntityValueObject.
|
privatepure virtual |
Returns 'true' if the location expression associated with this variable is valid.
Implemented in EntityVariable, and EntityValueObject.
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 440 of file Materializer.cpp.
References lldb_private::Status::AsCString(), lldb_private::eAddressTypeInvalid, lldb_private::IRMemoryMap::eAllocationPolicyMirror, lldb_private::Status::Fail(), lldb_private::DataExtractor::GetAddress(), lldb_private::IRMemoryMap::GetBestExecutionContextScope(), lldb_private::DataExtractor::GetByteSize(), lldb_private::DataExtractor::GetDataStart(), lldb_private::Status::GetError(), lldb_private::GetLog(), GetName(), LLDB_INVALID_ADDRESS, LLDB_LOGF, lldb_private::IRMemoryMap::Malloc(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::Status::Success(), 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 EntityVariable, and EntityValueObject.
|
inlineoverridevirtual |
Implements lldb_private::Materializer::Entity.
Definition at line 745 of file Materializer.cpp.
References lldb_private::IRMemoryMap::Free(), and LLDB_INVALID_ADDRESS.
|
protected |
Definition at line 793 of file Materializer.cpp.
|
protected |
Definition at line 796 of file Materializer.cpp.
|
protected |
Definition at line 794 of file Materializer.cpp.
|
protected |
Definition at line 795 of file Materializer.cpp.