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/Interpreter/CommandObject.cpp | |
parent | 88db3171dd5dcc54e3890b6f823c60831fc520a5 (diff) | |
download | bcm5719-llvm-998255bfe841a4191d458a56aae0267f673b1a72.tar.gz bcm5719-llvm-998255bfe841a4191d458a56aae0267f673b1a72.zip |
<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/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 11e90f243df..8d8520d8085 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -377,23 +377,19 @@ CommandObject::HandleCompletion bool CommandObject::HelpTextContainsWord (const char *search_word) { - const char *short_help; - const char *long_help; - const char *syntax_help; std::string options_usage_help; - bool found_word = false; - short_help = GetHelp(); - long_help = GetHelpLong(); - syntax_help = GetSyntax(); + const char *short_help = GetHelp(); + const char *long_help = GetHelpLong(); + const char *syntax_help = GetSyntax(); - if (strcasestr (short_help, search_word)) + if (short_help && strcasestr (short_help, search_word)) found_word = true; - else if (strcasestr (long_help, search_word)) + else if (long_help && strcasestr (long_help, search_word)) found_word = true; - else if (strcasestr (syntax_help, search_word)) + else if (syntax_help && strcasestr (syntax_help, search_word)) found_word = true; if (!found_word |