24 std::optional<uint64_t> byte_size =
25 llvm::expectedToOptional(valobj_sp->GetByteSize());
26 if (byte_size && *byte_size) {
27 if (valobj_sp->GetDataExtractor().GetByteSize() < *byte_size) {
28 valobj_sp->GetValue().ResizeData(*byte_size);
29 valobj_sp->GetValue().GetData(valobj_sp->GetDataExtractor());
31 return const_cast<uint8_t *
>(valobj_sp->GetDataExtractor().GetDataStart());
61 if (!
m_frozen_sp->GetCompilerType().IsPointerOrReferenceType())
67 !process_sp->IsPossibleDynamicValue(*(
m_frozen_sp.get())))
85 process_sp->ReadPointerFromMemory(live_addr,
error);
89 if (cur_value != static_addr.
address) {
91 "Stored value: {0} read from {1} doesn't "
92 "match static addr: {2}",
93 cur_value, live_addr, static_addr.
address);
97 if (!process_sp->WritePointerToMemory(live_addr, dynamic_addr.
address,
99 LLDB_LOG(log,
"Got error: {0} writing dynamic value: {1} to {2}",
error,
100 dynamic_addr.
address, live_addr);
123 LLDB_LOGF(log,
"Registering JITted Functions:\n");
126 execution_unit_sp->GetJittedFunctions()) {
127 if (jitted_function.m_external &&
128 jitted_function.m_name != execution_unit_sp->GetFunctionName() &&
131 jitted_function.m_remote_addr;
132 LLDB_LOGF(log,
" Function: %s at 0x%" PRIx64
".",
133 jitted_function.m_name.GetCString(),
134 jitted_function.m_remote_addr);
138 LLDB_LOGF(log,
"Registering JIIted Symbols:\n");
141 execution_unit_sp->GetJittedGlobalVariables()) {
146 Mangled mangler(global_var.m_name);
148 m_symbol_map[global_var.m_name.GetCString()] = global_var.m_remote_addr;
149 LLDB_LOGF(log,
" Symbol: %s at 0x%" PRIx64
".",
150 global_var.m_name.GetCString(), global_var.m_remote_addr);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_LOGF(log,...)
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
lldb::ValueObjectSP m_live_sp
The ValueObject counterpart to m_frozen_sp that tracks the value in inferior memory.
void TransferAddress(bool force=false)
This function is used to copy the address-of m_live_sp into m_frozen_sp.
uint8_t * GetValueBytes()
lldb::ValueObjectSP m_frozen_sp
These members should be private.
lldb::ValueObjectSP GetValueObject()
lldb::DynamicValueType m_dyn_option
static char ID
LLVM RTTI support.
A class that handles mangled names.
ConstString GetDemangledName() const
Demangled name get accessor.
void RegisterExecutionUnit(lldb::IRExecutionUnitSP &execution_unit_sp)
static char ID
LLVM RTTI support.
ExecutionUnitSet m_execution_units
The execution units that contain valuable symbols.
virtual ~PersistentExpressionState()
SymbolMap m_symbol_map
The addresses of the symbols in m_execution_units.
PersistentExpressionState()
virtual lldb::addr_t LookupSymbol(ConstString name)
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
@ eAddressTypeLoad
Address is an address as in the current target inferior process.
std::shared_ptr< lldb_private::IRExecutionUnit > IRExecutionUnitSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Process > ProcessSP
"lldb/Expression/IRExecutionUnit.h" Encapsulates a single function that has been generated by the JIT...