diff options
Diffstat (limited to 'lldb/source/Core')
-rw-r--r-- | lldb/source/Core/DataExtractor.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/Value.cpp | 36 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectVariable.cpp | 2 |
3 files changed, 30 insertions, 10 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index e6c8a4dcd0d..2c805417432 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1253,7 +1253,7 @@ DataExtractor::Dump // earlier C++ libraries std::string binary_value(64, '0'); std::bitset<64> bits(uval64); - for (size_t i = 0; i < 64; ++i) + for (i = 0; i < 64; ++i) if (bits[i]) binary_value[64 - 1 - i] = '1'; if (item_bit_size > 0) diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index ce6a95b78e2..41483c7c7cc 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -142,6 +142,26 @@ Value::Value(const Value &v) : } } +Value & +Value::operator=(const Value &rhs) +{ + if (this != &rhs) + { + m_value = rhs.m_value; + m_value_type = rhs.m_value_type; + m_context = rhs.m_context; + m_context_type = rhs.m_context_type; + if ((uintptr_t)rhs.m_value.ULongLong(LLDB_INVALID_ADDRESS) == (uintptr_t)rhs.m_data_buffer.GetBytes()) + { + m_data_buffer.CopyData(rhs.m_data_buffer.GetBytes(), + rhs.m_data_buffer.GetByteSize()); + + m_value = (uintptr_t)m_data_buffer.GetBytes(); + } + } + return *this; +} + Value * Value::CreateProxy() { @@ -653,17 +673,17 @@ Value::ResolveValue(ExecutionContext *exe_ctx, clang::ASTContext *ast_context) { // Resolve the proxy - Value * v = (Value*)m_context; + Value * rhs = (Value*)m_context; - m_value = v->m_value; - m_value_type = v->m_value_type; - m_context = v->m_context; - m_context_type = v->m_context_type; + m_value = rhs->m_value; + m_value_type = rhs->m_value_type; + m_context = rhs->m_context; + m_context_type = rhs->m_context_type; - if ((uintptr_t)v->m_value.ULongLong(LLDB_INVALID_ADDRESS) == (uintptr_t)v->m_data_buffer.GetBytes()) + if ((uintptr_t)rhs->m_value.ULongLong(LLDB_INVALID_ADDRESS) == (uintptr_t)rhs->m_data_buffer.GetBytes()) { - m_data_buffer.CopyData(v->m_data_buffer.GetBytes(), - v->m_data_buffer.GetByteSize()); + m_data_buffer.CopyData(rhs->m_data_buffer.GetBytes(), + rhs->m_data_buffer.GetByteSize()); m_value = (uintptr_t)m_data_buffer.GetBytes(); } diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index bcf4206476c..f73ce64e5e3 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -118,7 +118,7 @@ ValueObjectVariable::UpdateValue (ExecutionContextScope *exe_scope) loclist_base_load_addr = sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (exe_ctx.target); } Value old_value(m_value); - if (expr.Evaluate (&exe_ctx, GetClangAST(), NULL, loclist_base_load_addr, NULL, m_value, &m_error)) + if (expr.Evaluate (&exe_ctx, GetClangAST(), NULL, NULL, NULL, loclist_base_load_addr, NULL, m_value, &m_error)) { m_value.SetContext(Value::eContextTypeVariable, variable); |