summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Interpreter/OptionValueFileSpec.cpp19
-rw-r--r--lldb/source/Interpreter/Property.cpp5
2 files changed, 16 insertions, 8 deletions
diff --git a/lldb/source/Interpreter/OptionValueFileSpec.cpp b/lldb/source/Interpreter/OptionValueFileSpec.cpp
index 3f466985a83..6538a64627d 100644
--- a/lldb/source/Interpreter/OptionValueFileSpec.cpp
+++ b/lldb/source/Interpreter/OptionValueFileSpec.cpp
@@ -24,31 +24,36 @@ using namespace lldb;
using namespace lldb_private;
-OptionValueFileSpec::OptionValueFileSpec () :
+OptionValueFileSpec::OptionValueFileSpec (bool resolve) :
OptionValue(),
m_current_value (),
m_default_value (),
m_data_sp(),
- m_completion_mask (CommandCompletions::eDiskFileCompletion)
+ m_completion_mask (CommandCompletions::eDiskFileCompletion),
+ m_resolve (resolve)
{
}
-OptionValueFileSpec::OptionValueFileSpec (const FileSpec &value) :
+OptionValueFileSpec::OptionValueFileSpec (const FileSpec &value,
+ bool resolve) :
OptionValue(),
m_current_value (value),
m_default_value (value),
m_data_sp(),
- m_completion_mask (CommandCompletions::eDiskFileCompletion)
+ m_completion_mask (CommandCompletions::eDiskFileCompletion),
+ m_resolve (resolve)
{
}
OptionValueFileSpec::OptionValueFileSpec (const FileSpec &current_value,
- const FileSpec &default_value) :
+ const FileSpec &default_value,
+ bool resolve) :
OptionValue(),
m_current_value (current_value),
m_default_value (default_value),
m_data_sp(),
- m_completion_mask (CommandCompletions::eDiskFileCompletion)
+ m_completion_mask (CommandCompletions::eDiskFileCompletion),
+ m_resolve (resolve)
{
}
@@ -99,7 +104,7 @@ OptionValueFileSpec::SetValueFromCString (const char *value_cstr,
filepath.erase (suffix_chars_to_trim + 1);
m_value_was_set = true;
- m_current_value.SetFile(filepath.c_str(), true);
+ m_current_value.SetFile(filepath.c_str(), m_resolve);
m_data_sp.reset();
NotifyValueChanged();
}
diff --git a/lldb/source/Interpreter/Property.cpp b/lldb/source/Interpreter/Property.cpp
index 5679ef8dd3b..ebc18bccbdf 100644
--- a/lldb/source/Interpreter/Property.cpp
+++ b/lldb/source/Interpreter/Property.cpp
@@ -94,10 +94,13 @@ Property::Property (const PropertyDefinition &definition) :
break;
case OptionValue::eTypeFileSpec:
+ {
// "definition.default_uint_value" represents if the "definition.default_cstr_value" should
// be resolved or not
- m_value_sp.reset (new OptionValueFileSpec(FileSpec(definition.default_cstr_value, definition.default_uint_value != 0)));
+ const bool resolve = definition.default_uint_value != 0;
+ m_value_sp.reset (new OptionValueFileSpec(FileSpec(definition.default_cstr_value, resolve), resolve));
break;
+ }
case OptionValue::eTypeFileSpecList:
// "definition.default_uint_value" is not used for a OptionValue::eTypeFileSpecList
OpenPOWER on IntegriCloud