diff options
author | Greg Clayton <gclayton@apple.com> | 2012-10-13 02:07:45 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-10-13 02:07:45 +0000 |
commit | 998255bfe841a4191d458a56aae0267f673b1a72 (patch) | |
tree | ada5b24a203f1a24e041f9cce2188283d037de98 /lldb/source/Commands/CommandObjectHelp.cpp | |
parent | 88db3171dd5dcc54e3890b6f823c60831fc520a5 (diff) | |
download | llvm-998255bfe841a4191d458a56aae0267f673b1a72.zip llvm-998255bfe841a4191d458a56aae0267f673b1a72.tar.gz llvm-998255bfe841a4191d458a56aae0267f673b1a72.tar.bz2 |
<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
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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 @@ CommandObjectHelp::DoExecute (Args& command, CommandReturnObject &result) 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 @@ CommandObjectHelp::DoExecute (Args& command, CommandReturnObject &result) } else m_interpreter.OutputFormattedHelpText (output_strm, "", "", sub_cmd_obj->GetHelp(), 1); - ((CommandObjectMultiword *) sub_cmd_obj)->GenerateHelpText (result); + sub_cmd_obj->GenerateHelpText (result); } else { |