[Lldb-commits] [lldb] r199533 - Made sure that ValueObjectVariable actually
Sean Callanan
scallanan at apple.com
Fri Jan 17 17:13:50 PST 2014
Author: spyffe
Date: Fri Jan 17 19:13:50 2014
New Revision: 199533
URL: http://llvm.org/viewvc/llvm-project?rev=199533&view=rev
Log:
Made sure that ValueObjectVariable actually
updates itself before it tries to set its own
data. Otherwise it has no idea where to put the
data value.
<rdar://problem/15846476>
Modified:
lldb/trunk/source/Core/ValueObjectVariable.cpp
Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=199533&r1=199532&r2=199533&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Fri Jan 17 19:13:50 2014
@@ -328,6 +328,12 @@ ValueObjectVariable::GetLocationAsCStrin
bool
ValueObjectVariable::SetValueFromCString (const char *value_str, Error& error)
{
+ if (!UpdateValueIfNeeded())
+ {
+ error.SetErrorString("unable to update value before writing");
+ return false;
+ }
+
if (m_resolved_value.GetContextType() == Value::eContextTypeRegisterInfo)
{
RegisterInfo *reg_info = m_resolved_value.GetRegisterInfo();
@@ -360,6 +366,12 @@ ValueObjectVariable::SetValueFromCString
bool
ValueObjectVariable::SetData (DataExtractor &data, Error &error)
{
+ if (!UpdateValueIfNeeded())
+ {
+ error.SetErrorString("unable to update value before writing");
+ return false;
+ }
+
if (m_resolved_value.GetContextType() == Value::eContextTypeRegisterInfo)
{
RegisterInfo *reg_info = m_resolved_value.GetRegisterInfo();
More information about the lldb-commits
mailing list