summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueFileSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionValueFileSpec.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueFileSpec.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/OptionValueFileSpec.cpp b/lldb/source/Interpreter/OptionValueFileSpec.cpp
index 3a1f26dd5f6..03608753658 100644
--- a/lldb/source/Interpreter/OptionValueFileSpec.cpp
+++ b/lldb/source/Interpreter/OptionValueFileSpec.cpp
@@ -114,10 +114,15 @@ OptionValueFileSpec::AutoComplete (CommandInterpreter &interpreter,
const lldb::DataBufferSP &
-OptionValueFileSpec::GetFileContents()
+OptionValueFileSpec::GetFileContents(bool null_terminate)
{
if (!m_data_sp && m_current_value)
- m_data_sp = m_current_value.ReadFileContents();
+ {
+ if (null_terminate)
+ m_data_sp = m_current_value.ReadFileContentsAsCString();
+ else
+ m_data_sp = m_current_value.ReadFileContents();
+ }
return m_data_sp;
}
OpenPOWER on IntegriCloud