summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorOmair Javaid <omair.javaid@linaro.org>2016-11-22 09:47:00 +0000
committerOmair Javaid <omair.javaid@linaro.org>2016-11-22 09:47:00 +0000
commit99a318e11220f733e8bae8cb8417862ac979f7ea (patch)
treea588e205dd582de84165c9af8b39a5941be1e011 /lldb/source/Commands
parent49b3733d57692a4726cce257e95932f2b74a2b30 (diff)
downloadbcm5719-llvm-99a318e11220f733e8bae8cb8417862ac979f7ea.tar.gz
bcm5719-llvm-99a318e11220f733e8bae8cb8417862ac979f7ea.zip
Fix build failure on Linux and BSD by reverting r287597
Linux and BSD builds failing after this changes from rev 287597. llvm-svn: 287631
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp7
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp9
4 files changed, 17 insertions, 11 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index f1fa7b8ee7d..946bb83aa8f 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -1476,12 +1476,12 @@ public:
int match_start_point, int max_return_elements,
bool &word_complete,
StringList &matches) override {
- llvm::StringRef completion_str = input[cursor_index].ref;
- completion_str = completion_str.take_front(cursor_char_position);
+ std::string completion_str(input.GetArgumentAtIndex(cursor_index));
+ completion_str.erase(cursor_char_position);
CommandCompletions::InvokeCommonCompletionCallbacks(
GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
- completion_str, match_start_point, max_return_elements, nullptr,
+ completion_str.c_str(), match_start_point, max_return_elements, nullptr,
word_complete, matches);
return matches.GetSize();
}
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 74de945dbd9..56e2cc94c9d 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -473,12 +473,12 @@ public:
bool &word_complete,
StringList &matches) override {
// Arguments are the standard source file completer.
- auto completion_str = input[cursor_index].ref;
- completion_str = completion_str.take_front(cursor_char_position);
+ std::string completion_str(input.GetArgumentAtIndex(cursor_index));
+ completion_str.erase(cursor_char_position);
CommandCompletions::InvokeCommonCompletionCallbacks(
GetCommandInterpreter(), CommandCompletions::eVariablePathCompletion,
- completion_str, match_start_point, max_return_elements, nullptr,
+ completion_str.c_str(), match_start_point, max_return_elements, nullptr,
word_complete, matches);
return matches.GetSize();
}
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 5b7f1342328..fd3795e0859 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -1558,8 +1558,9 @@ protected:
int num_signals_set = 0;
if (num_args > 0) {
- for (const auto &arg : signal_args) {
- int32_t signo = signals_sp->GetSignalNumberFromName(arg.c_str());
+ for (size_t i = 0; i < num_args; ++i) {
+ int32_t signo = signals_sp->GetSignalNumberFromName(
+ signal_args.GetArgumentAtIndex(i));
if (signo != LLDB_INVALID_SIGNAL_NUMBER) {
// Casting the actions as bools here should be okay, because
// VerifyCommandOptionValue guarantees
@@ -1575,7 +1576,7 @@ protected:
++num_signals_set;
} else {
result.AppendErrorWithFormat("Invalid signal name '%s'\n",
- arg.c_str());
+ signal_args.GetArgumentAtIndex(i));
}
}
} else {
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 23fdcb9e895..0a97804fbf6 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -293,10 +293,15 @@ protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
result.SetStatus(eReturnStatusSuccessFinishResult);
+ const size_t argc = args.GetArgumentCount();
if (!args.empty()) {
- for (const auto &arg : args) {
+ // TODO: Convert this to StringRef based enumeration. Requires converting
+ // DumpPropertyValue first.
+ for (size_t i = 0; i < argc; ++i) {
+ const char *property_path = args.GetArgumentAtIndex(i);
+
Error error(m_interpreter.GetDebugger().DumpPropertyValue(
- &m_exe_ctx, result.GetOutputStream(), arg.ref,
+ &m_exe_ctx, result.GetOutputStream(), property_path,
OptionValue::eDumpGroupValue));
if (error.Success()) {
result.GetOutputStream().EOL();
OpenPOWER on IntegriCloud