<rdar://problem/11239650> Fixing a bug where the SetValueFromCString() method failed to operate on dynamic values. The fix consists in making the set operation fall through to the parent. We only actually allow this if the dynamic value is at a 0-offset from the parent, or the new value is 0. Other scenarios would need agreement on the actual meaning of the set operation (do we keep offsetting? do we just assume the user knows what they are doing?) so we prevent them, and let the expression parser deal with the complexity

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156422 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index a94b18b..5f8251e 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -430,9 +430,17 @@
     return cstr;
 }
 
+// Deprecated - use the one that takes an lldb::SBError
 bool
 SBValue::SetValueFromCString (const char *value_str)
 {
+    lldb::SBError dummy;
+    return SetValueFromCString(value_str,dummy);
+}
+
+bool
+SBValue::SetValueFromCString (const char *value_str, lldb::SBError& error)
+{
     bool success = false;
     lldb::ValueObjectSP value_sp(GetSP());
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
@@ -451,7 +459,7 @@
             if (target_sp)
             {
                 Mutex::Locker api_locker (target_sp->GetAPIMutex());
-                success = value_sp->SetValueFromCString (value_str);
+                success = value_sp->SetValueFromCString (value_str,error.ref());
             }
         }
     }