[Lldb-commits] [lldb] r106782 - /lldb/trunk/source/Interpreter/CommandInterpreter.cpp
Jim Ingham
jingham at apple.com
Thu Jun 24 13:28:42 PDT 2010
Author: jingham
Date: Thu Jun 24 15:28:42 2010
New Revision: 106782
URL: http://llvm.org/viewvc/llvm-project?rev=106782&view=rev
Log:
Fix a bug in handling command resolution for non-exact matches. Now we will correctly give help options when there are both aliases & real commands matching the current input string.
Modified:
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=106782&r1=106781&r2=106782&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Thu Jun 24 15:28:42 2010
@@ -316,13 +316,13 @@
ret_val = pos->second;
}
- if (num_cmd_matches != 1 && include_aliases && HasAliases())
+ if (include_aliases && HasAliases())
{
num_alias_matches = CommandObject::AddNamesMatchingPartialString (m_alias_dict, cmd_cstr, *matches);
}
- if (num_alias_matches == 1)
+ if (num_alias_matches == 1 && num_cmd_matches == 0)
{
cmd.assign(matches->GetStringAtIndex (num_cmd_matches));
pos = m_alias_dict.find(cmd);
@@ -335,12 +335,12 @@
}
}
- if (num_cmd_matches != 1 && num_alias_matches != 1 && HasUserCommands())
+ if (HasUserCommands())
{
num_user_matches = CommandObject::AddNamesMatchingPartialString (m_user_dict, cmd_cstr, *matches);
}
- if (num_user_matches == 1)
+ if (num_user_matches == 1 && num_alias_matches == 0 && num_cmd_matches == 0)
{
cmd.assign (matches->GetStringAtIndex (num_cmd_matches + num_alias_matches));
More information about the lldb-commits
mailing list