diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 5653e7a..41e216e 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -1071,7 +1071,6 @@ protected: CommandOptions m_options; }; - OptionDefinition CommandObjectProcessConnect::CommandOptions::g_option_table[] = { @@ -1080,6 +1079,39 @@ CommandObjectProcessConnect::CommandOptions::g_option_table[] = }; //------------------------------------------------------------------------- +// CommandObjectProcessPlugin +//------------------------------------------------------------------------- +#pragma mark CommandObjectProcessPlugin + +class CommandObjectProcessPlugin : public CommandObjectProxy +{ +public: + + CommandObjectProcessPlugin (CommandInterpreter &interpreter) : + CommandObjectProxy (interpreter, + "process plugin", + "Send a custom command to the current process plug-in.", + "process plugin <args>", + 0) + { + } + + ~CommandObjectProcessPlugin () + { + } + + virtual CommandObject * + GetProxyCommandObject() + { + Process *process = m_interpreter.GetExecutionContext().GetProcessPtr(); + if (process) + return process->GetPluginCommandObject(); + return NULL; + } +}; + + +//------------------------------------------------------------------------- // CommandObjectProcessLoad //------------------------------------------------------------------------- #pragma mark CommandObjectProcessLoad @@ -1794,6 +1826,7 @@ CommandObjectMultiwordProcess::CommandObjectMultiwordProcess (CommandInterpreter LoadSubCommand ("status", CommandObjectSP (new CommandObjectProcessStatus (interpreter))); LoadSubCommand ("interrupt", CommandObjectSP (new CommandObjectProcessInterrupt (interpreter))); LoadSubCommand ("kill", CommandObjectSP (new CommandObjectProcessKill (interpreter))); + LoadSubCommand ("plugin", CommandObjectSP (new CommandObjectProcessPlugin (interpreter))); } CommandObjectMultiwordProcess::~CommandObjectMultiwordProcess () |
