summaryrefslogtreecommitdiff
path: root/source/Interpreter/OptionValueArray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Interpreter/OptionValueArray.cpp')
-rw-r--r--source/Interpreter/OptionValueArray.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/Interpreter/OptionValueArray.cpp b/source/Interpreter/OptionValueArray.cpp
index 86d49c9ba3b4..aabe457534d6 100644
--- a/source/Interpreter/OptionValueArray.cpp
+++ b/source/Interpreter/OptionValueArray.cpp
@@ -74,11 +74,13 @@ OptionValueArray::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint
}
Error
-OptionValueArray::SetValueFromCString (const char *value, VarSetOperationType op)
+OptionValueArray::SetValueFromString (llvm::StringRef value, VarSetOperationType op)
{
- Args args(value);
- NotifyValueChanged();
- return SetArgs (args, op);
+ Args args(value.str().c_str());
+ Error error = SetArgs (args, op);
+ if (error.Success())
+ NotifyValueChanged();
+ return error;
}
@@ -342,6 +344,8 @@ OptionValueArray::DeepCopy () const
{
OptionValueArray *copied_array = new OptionValueArray (m_type_mask, m_raw_value_dump);
lldb::OptionValueSP copied_value_sp(copied_array);
+ *static_cast<OptionValue *>(copied_array) = *this;
+ copied_array->m_callback = m_callback;
const uint32_t size = m_values.size();
for (uint32_t i = 0; i<size; ++i)
{