[Lldb-commits] [lldb] r120516 - /lldb/trunk/source/Commands/CommandObjectMultiword.cpp

Johnny Chen johnny.chen at apple.com
Tue Nov 30 17:04:22 PST 2010


Author: johnny
Date: Tue Nov 30 19:04:22 2010
New Revision: 120516

URL: http://llvm.org/viewvc/llvm-project?rev=120516&view=rev
Log:
Make CommandObjectMultiword::GetSubcommandSP() more robust by appending the
exactly-matched sub_cmd to the passed in 'matches' string list.

Modified:
    lldb/trunk/source/Commands/CommandObjectMultiword.cpp

Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=120516&r1=120515&r2=120516&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Tue Nov 30 19:04:22 2010
@@ -49,8 +49,12 @@
     if (!m_subcommand_dict.empty())
     {
         pos = m_subcommand_dict.find (sub_cmd);
-        if (pos != m_subcommand_dict.end())
+        if (pos != m_subcommand_dict.end()) {
+            // An exact match; append the sub_cmd to the 'matches' string list.
+            if (matches)
+                matches->AppendString(sub_cmd);
             return_cmd_sp = pos->second;
+        }
         else
         {
 





More information about the lldb-commits mailing list