<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!
llvm-svn: 165861
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp
index 5dfb105b..3879005 100644
--- a/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/lldb/source/Commands/CommandObjectHelp.cpp
@@ -103,8 +103,7 @@
else
{
CommandObject *found_cmd;
- found_cmd = ((CommandObjectMultiword *) sub_cmd_obj)->GetSubcommandObject(sub_command.c_str(),
- &matches);
+ found_cmd = sub_cmd_obj->GetSubcommandObject(sub_command.c_str(), &matches);
if (found_cmd == NULL)
all_okay = false;
else if (matches.GetSize() > 1)
@@ -189,7 +188,7 @@
}
else
m_interpreter.OutputFormattedHelpText (output_strm, "", "", sub_cmd_obj->GetHelp(), 1);
- ((CommandObjectMultiword *) sub_cmd_obj)->GenerateHelpText (result);
+ sub_cmd_obj->GenerateHelpText (result);
}
else
{