diff options
author | Sean Callanan <scallanan@apple.com> | 2014-01-18 01:13:50 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2014-01-18 01:13:50 +0000 |
commit | 6826d2278428019e45016137272b08a7170413aa (patch) | |
tree | 6afc30c83bf2fbc00e420c871db08797dc597e84 | |
parent | 661f35b0c54c79805e6b17944b155c111bc39ec3 (diff) | |
download | bcm5719-llvm-6826d2278428019e45016137272b08a7170413aa.tar.gz bcm5719-llvm-6826d2278428019e45016137272b08a7170413aa.zip |
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>
llvm-svn: 199533
-rw-r--r-- | lldb/source/Core/ValueObjectVariable.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index 3d8b07a3694..c010c2c2d76 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -328,6 +328,12 @@ ValueObjectVariable::GetLocationAsCString () 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 (const char *value_str, Error& error) 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(); |