summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp9
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp21
-rw-r--r--lldb/source/Target/ThreadPlanStepThrough.cpp2
3 files changed, 20 insertions, 12 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index f84b401f3aa..69b178da46b 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -235,18 +235,19 @@ CommandObjectMultiword::HandleCompletion
// completers will override this.
word_complete = true;
+ const char *arg0 = input.GetArgumentAtIndex(0);
if (cursor_index == 0)
{
CommandObject::AddNamesMatchingPartialString (m_subcommand_dict,
- input.GetArgumentAtIndex(0),
+ arg0,
matches);
if (matches.GetSize() == 1
&& matches.GetStringAtIndex(0) != NULL
- && strcmp (input.GetArgumentAtIndex(0), matches.GetStringAtIndex(0)) == 0)
+ && strcmp (arg0, matches.GetStringAtIndex(0)) == 0)
{
StringList temp_matches;
- CommandObject *cmd_obj = GetSubcommandObject (input.GetArgumentAtIndex(0),
+ CommandObject *cmd_obj = GetSubcommandObject (arg0,
&temp_matches);
if (cmd_obj != NULL)
{
@@ -270,7 +271,7 @@ CommandObjectMultiword::HandleCompletion
}
else
{
- CommandObject *sub_command_object = GetSubcommandObject (input.GetArgumentAtIndex(0),
+ CommandObject *sub_command_object = GetSubcommandObject (arg0,
&matches);
if (sub_command_object == NULL)
{
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index a7c892d255e..53642db940d 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1929,12 +1929,19 @@ CommandInterpreter::HandleCompletionMatches (Args &parsed_line,
&& matches.GetStringAtIndex(0) != NULL
&& strcmp (parsed_line.GetArgumentAtIndex(0), matches.GetStringAtIndex(0)) == 0)
{
- look_for_subcommand = true;
- num_command_matches = 0;
- matches.DeleteStringAtIndex(0);
- parsed_line.AppendArgument ("");
- cursor_index++;
- cursor_char_position = 0;
+ if (parsed_line.GetArgumentCount() == 1)
+ {
+ word_complete = true;
+ }
+ else
+ {
+ look_for_subcommand = true;
+ num_command_matches = 0;
+ matches.DeleteStringAtIndex(0);
+ parsed_line.AppendArgument ("");
+ cursor_index++;
+ cursor_char_position = 0;
+ }
}
}
@@ -2023,7 +2030,7 @@ CommandInterpreter::HandleCompletion (const char *current_line,
const char *current_elem = partial_parsed_line.GetArgumentAtIndex(cursor_index);
if (cursor_char_position == 0 || current_elem[cursor_char_position - 1] != ' ')
{
- parsed_line.InsertArgumentAtIndex(cursor_index + 1, "", '"');
+ parsed_line.InsertArgumentAtIndex(cursor_index + 1, "", '\0');
cursor_index++;
cursor_char_position = 0;
}
diff --git a/lldb/source/Target/ThreadPlanStepThrough.cpp b/lldb/source/Target/ThreadPlanStepThrough.cpp
index 18da6cdbd59..37cd03c6986 100644
--- a/lldb/source/Target/ThreadPlanStepThrough.cpp
+++ b/lldb/source/Target/ThreadPlanStepThrough.cpp
@@ -161,7 +161,7 @@ ThreadPlanStepThrough::ShouldStop (Event *event_ptr)
// First, did we hit the backstop breakpoint?
if (HitOurBackstopBreakpoint())
{
- SetPlanComplete(true);
+ SetPlanComplete(false);
return true;
}
OpenPOWER on IntegriCloud