Index: include/lldb/API/SBCommandInterpreter.h =================================================================== --- include/lldb/API/SBCommandInterpreter.h +++ include/lldb/API/SBCommandInterpreter.h @@ -139,7 +139,7 @@ AddMultiwordCommand (const char* name, const char* help); lldb::SBCommand - AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help); + AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help, const char* syntax); void SourceInitFileInHomeDirectory (lldb::SBCommandReturnObject &result); @@ -267,6 +267,7 @@ virtual bool DoExecute (lldb::SBDebugger /*debugger*/, char** /*command*/, + size_t /*number of arguments*/, lldb::SBCommandReturnObject & /*result*/) { return false; @@ -306,7 +307,7 @@ AddMultiwordCommand(const char* name, const char* help = nullptr); lldb::SBCommand - AddCommand(const char* name, lldb::SBCommandPluginInterface* impl, const char* help = nullptr); + AddCommand(const char* name, lldb::SBCommandPluginInterface* impl, const char* help = nullptr, const char* syntax = nullptr); private: friend class SBDebugger; Index: packages/Python/lldbsuite/test/functionalities/plugins/commands/plugin.cpp =================================================================== --- packages/Python/lldbsuite/test/functionalities/plugins/commands/plugin.cpp +++ packages/Python/lldbsuite/test/functionalities/plugins/commands/plugin.cpp @@ -34,6 +34,7 @@ virtual bool DoExecute (lldb::SBDebugger debugger, char** command, + size_t arg_count, lldb::SBCommandReturnObject &result) { if (command) Index: source/API/SBCommandInterpreter.cpp =================================================================== --- source/API/SBCommandInterpreter.cpp +++ source/API/SBCommandInterpreter.cpp @@ -149,11 +149,11 @@ SBCommandReturnObject sb_return(&result); SBCommandInterpreter sb_interpreter(&m_interpreter); SBDebugger debugger_sb(m_interpreter.GetDebugger().shared_from_this()); - bool ret = m_backend->DoExecute (debugger_sb,(char**)command.GetArgumentVector(), sb_return); + bool ret = m_backend->DoExecute (debugger_sb,(char**)command.GetArgumentVector(),command.GetArgumentCount(), sb_return); sb_return.Release(); return ret; } - lldb::SBCommandPluginInterface* m_backend; + std::shared_ptr m_backend; }; SBCommandInterpreter::SBCommandInterpreter (CommandInterpreter *interpreter) : @@ -595,10 +595,10 @@ } lldb::SBCommand -SBCommandInterpreter::AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help) +SBCommandInterpreter::AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help, const char* syntax) { lldb::CommandObjectSP new_command_sp; - new_command_sp.reset(new CommandPluginInterfaceImplementation(*m_opaque_ptr,name, impl, help)); + new_command_sp.reset(new CommandPluginInterfaceImplementation(*m_opaque_ptr,name, impl, help, syntax)); if (new_command_sp && m_opaque_ptr->AddUserCommand(name, new_command_sp, true)) return lldb::SBCommand(new_command_sp); @@ -664,14 +664,14 @@ } lldb::SBCommand -SBCommand::AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help) +SBCommand::AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help, const char* syntax) { if (!IsValid ()) return lldb::SBCommand(); if (!m_opaque_sp->IsMultiwordObject()) return lldb::SBCommand(); lldb::CommandObjectSP new_command_sp; - new_command_sp.reset(new CommandPluginInterfaceImplementation(m_opaque_sp->GetCommandInterpreter(),name,impl,help)); + new_command_sp.reset(new CommandPluginInterfaceImplementation(m_opaque_sp->GetCommandInterpreter(),name,impl,help, syntax)); if (new_command_sp && m_opaque_sp->LoadSubCommand(name,new_command_sp)) return lldb::SBCommand(new_command_sp); return lldb::SBCommand();