<rdar://problem/12491387>

I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override:

virtual CommandObject *
GetPluginCommandObject();

This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented! 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165861 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectSyntax.cpp b/source/Commands/CommandObjectSyntax.cpp
index d96542e..64308aa 100644
--- a/source/Commands/CommandObjectSyntax.cpp
+++ b/source/Commands/CommandObjectSyntax.cpp
@@ -66,14 +66,12 @@
         for (int i = 1; i < argc; ++i)
         {
             std::string sub_command = command.GetArgumentAtIndex (i);
-            if (! cmd_obj->IsMultiwordObject())
+            if (!cmd_obj->IsMultiwordObject())
                 all_okay = false;
             else
             {
-                pos = ((CommandObjectMultiword *) cmd_obj)->m_subcommand_dict.find (sub_command);
-                if (pos != ((CommandObjectMultiword *) cmd_obj)->m_subcommand_dict.end())
-                    cmd_obj = pos->second.get();
-                else
+                cmd_obj = cmd_obj->GetSubcommandObject(sub_command.c_str());
+                if (!cmd_obj)
                     all_okay = false;
             }
         }