summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/OptionValue.cpp2
-rw-r--r--lldb/source/Interpreter/OptionValueFileSpec.cpp8
-rw-r--r--lldb/source/Interpreter/OptionValueProperties.cpp14
3 files changed, 23 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/OptionValue.cpp b/lldb/source/Interpreter/OptionValue.cpp
index 01ba65cf107..564fec8bc28 100644
--- a/lldb/source/Interpreter/OptionValue.cpp
+++ b/lldb/source/Interpreter/OptionValue.cpp
@@ -379,7 +379,7 @@ OptionValue::SetFileSpecValue (const FileSpec &file_spec)
OptionValueFileSpec *option_value = GetAsFileSpec ();
if (option_value)
{
- option_value->SetCurrentValue(file_spec);
+ option_value->SetCurrentValue(file_spec, false);
return true;
}
return false;
diff --git a/lldb/source/Interpreter/OptionValueFileSpec.cpp b/lldb/source/Interpreter/OptionValueFileSpec.cpp
index 20b0b043e0b..3a1f26dd5f6 100644
--- a/lldb/source/Interpreter/OptionValueFileSpec.cpp
+++ b/lldb/source/Interpreter/OptionValueFileSpec.cpp
@@ -113,4 +113,12 @@ OptionValueFileSpec::AutoComplete (CommandInterpreter &interpreter,
+const lldb::DataBufferSP &
+OptionValueFileSpec::GetFileContents()
+{
+ if (!m_data_sp && m_current_value)
+ m_data_sp = m_current_value.ReadFileContents();
+ return m_data_sp;
+}
+
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp
index ce31c15678a..304ce6299ed 100644
--- a/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -407,6 +407,20 @@ OptionValueProperties::SetPropertyAtIndexAsEnumeration (const ExecutionContext *
}
+OptionValueFileSpec *
+OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpec (const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const
+{
+ const Property *property = GetPropertyAtIndex (exe_ctx, false, idx);
+ if (property)
+ {
+ OptionValue *value = property->GetValue().get();
+ if (value)
+ return value->GetAsFileSpec();
+ }
+ return NULL;
+}
+
+
FileSpec
OptionValueProperties::GetPropertyAtIndexAsFileSpec (const ExecutionContext *exe_ctx, uint32_t idx) const
{
OpenPOWER on IntegriCloud