summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp22
-rw-r--r--lldb/source/Interpreter/OptionValue.cpp4
-rw-r--r--lldb/source/Interpreter/OptionValueProperties.cpp2
3 files changed, 15 insertions, 13 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index eca4278d235..f2eec88ccf4 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1899,7 +1899,7 @@ int CommandInterpreter::HandleCompletion(
CommandInterpreter::~CommandInterpreter() {}
-void CommandInterpreter::UpdatePrompt(const char *new_prompt) {
+void CommandInterpreter::UpdatePrompt(llvm::StringRef new_prompt) {
EventSP prompt_change_event_sp(
new Event(eBroadcastBitResetPrompt, new EventDataBytes(new_prompt)));
;
@@ -2238,7 +2238,9 @@ void CommandInterpreter::HandleCommands(const StringList &commands,
continue;
if (options.GetEchoCommands()) {
- result.AppendMessageWithFormat("%s %s\n", m_debugger.GetPrompt(), cmd);
+ // TODO: Add Stream support.
+ result.AppendMessageWithFormat("%s %s\n",
+ m_debugger.GetPrompt().str().c_str(), cmd);
}
CommandReturnObject tmp_result;
@@ -2461,7 +2463,7 @@ void CommandInterpreter::HandleCommandsFromFile(
flags,
nullptr, // Pass in NULL for "editline_name" so no history is saved,
// or written
- debugger.GetPrompt(), NULL,
+ debugger.GetPrompt(), llvm::StringRef(),
false, // Not multi-line
debugger.GetUseColor(), 0, *this));
const bool old_async_execution = debugger.GetAsyncExecution();
@@ -2824,9 +2826,9 @@ void CommandInterpreter::GetLLDBCommandsFromIOHandler(
IOHandlerSP io_handler_sp(
new IOHandlerEditline(debugger, IOHandler::Type::CommandList,
"lldb", // Name of input reader for history
- prompt, // Prompt
- NULL, // Continuation prompt
- true, // Get multiple lines
+ llvm::StringRef::withNullAsEmpty(prompt), // Prompt
+ llvm::StringRef(), // Continuation prompt
+ true, // Get multiple lines
debugger.GetUseColor(),
0, // Don't show line numbers
delegate)); // IOHandlerDelegate
@@ -2847,9 +2849,9 @@ void CommandInterpreter::GetPythonCommandsFromIOHandler(
IOHandlerSP io_handler_sp(
new IOHandlerEditline(debugger, IOHandler::Type::PythonCode,
"lldb-python", // Name of input reader for history
- prompt, // Prompt
- NULL, // Continuation prompt
- true, // Get multiple lines
+ llvm::StringRef::withNullAsEmpty(prompt), // Prompt
+ llvm::StringRef(), // Continuation prompt
+ true, // Get multiple lines
debugger.GetUseColor(),
0, // Don't show line numbers
delegate)); // IOHandlerDelegate
@@ -2898,7 +2900,7 @@ CommandInterpreter::GetIOHandler(bool force_create,
m_debugger, IOHandler::Type::CommandInterpreter,
m_debugger.GetInputFile(), m_debugger.GetOutputFile(),
m_debugger.GetErrorFile(), flags, "lldb", m_debugger.GetPrompt(),
- NULL, // Continuation prompt
+ llvm::StringRef(), // Continuation prompt
false, // Don't enable multiple line input, just single line commands
m_debugger.GetUseColor(),
0, // Don't show line numbers
diff --git a/lldb/source/Interpreter/OptionValue.cpp b/lldb/source/Interpreter/OptionValue.cpp
index 1d472e37a7b..bacdbc59791 100644
--- a/lldb/source/Interpreter/OptionValue.cpp
+++ b/lldb/source/Interpreter/OptionValue.cpp
@@ -419,10 +419,10 @@ const char *OptionValue::GetStringValue(const char *fail_value) const {
return fail_value;
}
-bool OptionValue::SetStringValue(const char *new_value) {
+bool OptionValue::SetStringValue(llvm::StringRef new_value) {
OptionValueString *option_value = GetAsString();
if (option_value) {
- option_value->SetCurrentValue(llvm::StringRef::withNullAsEmpty(new_value));
+ option_value->SetCurrentValue(new_value);
return true;
}
return false;
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp
index d5f7e3f18a0..a6fed486c5a 100644
--- a/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -491,7 +491,7 @@ const char *OptionValueProperties::GetPropertyAtIndexAsString(
}
bool OptionValueProperties::SetPropertyAtIndexAsString(
- const ExecutionContext *exe_ctx, uint32_t idx, const char *new_value) {
+ const ExecutionContext *exe_ctx, uint32_t idx, llvm::StringRef new_value) {
const Property *property = GetPropertyAtIndex(exe_ctx, true, idx);
if (property) {
OptionValue *value = property->GetValue().get();
OpenPOWER on IntegriCloud