summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Core/ValueObjectConstResult.cpp7
-rw-r--r--lldb/source/Target/ABI.cpp3
2 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp
index 950d33405af..ee82e24980f 100644
--- a/lldb/source/Core/ValueObjectConstResult.cpp
+++ b/lldb/source/Core/ValueObjectConstResult.cpp
@@ -98,6 +98,13 @@ ValueObjectConstResult::ValueObjectConstResult
m_impl(this, address)
{
m_data = data;
+
+ if (!m_data.GetSharedDataBuffer())
+ {
+ DataBufferSP shared_data_buffer(new DataBufferHeap(data.GetDataStart(), data.GetByteSize()));
+ m_data.SetData(shared_data_buffer);
+ }
+
m_value.GetScalar() = (uintptr_t)m_data.GetDataStart();
m_value.SetValueType(Value::eValueTypeHostAddress);
m_value.SetContext(Value::eContextTypeClangType, clang_type);
diff --git a/lldb/source/Target/ABI.cpp b/lldb/source/Target/ABI.cpp
index 7d82ab17bc7..0ac91daa29e 100644
--- a/lldb/source/Target/ABI.cpp
+++ b/lldb/source/Target/ABI.cpp
@@ -156,6 +156,7 @@ ABI::GetReturnValueObject (Thread &thread,
// we don't do anything with these for now
break;
case Value::eValueTypeScalar:
+ clang_expr_variable_sp->m_flags |= ClangExpressionVariable::EVIsFreezeDried;
clang_expr_variable_sp->m_flags |= ClangExpressionVariable::EVIsLLDBAllocated;
clang_expr_variable_sp->m_flags |= ClangExpressionVariable::EVNeedsAllocation;
break;
@@ -164,8 +165,8 @@ ABI::GetReturnValueObject (Thread &thread,
clang_expr_variable_sp->m_flags |= ClangExpressionVariable::EVIsProgramReference;
break;
}
+
return_valobj_sp = clang_expr_variable_sp->GetValueObject();
-
}
return return_valobj_sp;
}
OpenPOWER on IntegriCloud