Index: lldb/source/Commands/CommandObjectBreakpoint.cpp =================================================================== --- lldb/source/Commands/CommandObjectBreakpoint.cpp +++ lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -1762,6 +1762,14 @@ ~CommandObjectBreakpointNameAdd() override = default; + void + HandleArgumentCompletion(CompletionRequest &request, + OptionElementVector &opt_element_vector) override { + CommandCompletions::InvokeCommonCompletionCallbacks( + GetCommandInterpreter(), CommandCompletions::eBreakpointCompletion, + request, nullptr); + } + Options *GetOptions() override { return &m_option_group; } protected: @@ -1841,6 +1849,14 @@ ~CommandObjectBreakpointNameDelete() override = default; + void + HandleArgumentCompletion(CompletionRequest &request, + OptionElementVector &opt_element_vector) override { + CommandCompletions::InvokeCommonCompletionCallbacks( + GetCommandInterpreter(), CommandCompletions::eBreakpointCompletion, + request, nullptr); + } + Options *GetOptions() override { return &m_option_group; } protected: @@ -2139,6 +2155,14 @@ ~CommandObjectBreakpointWrite() override = default; + void + HandleArgumentCompletion(CompletionRequest &request, + OptionElementVector &opt_element_vector) override { + CommandCompletions::InvokeCommonCompletionCallbacks( + GetCommandInterpreter(), CommandCompletions::eBreakpointCompletion, + request, nullptr); + } + Options *GetOptions() override { return &m_options; } class CommandOptions : public Options { Index: lldb/test/API/functionalities/completion/TestCompletion.py =================================================================== --- lldb/test/API/functionalities/completion/TestCompletion.py +++ lldb/test/API/functionalities/completion/TestCompletion.py @@ -478,10 +478,10 @@ self.complete_from_to('register write rbx ', []) - def test_breakpoint_enable_disable_delete_modify_with_ids(self): - """These four breakpoint subcommands should be completed with a list of breakpoint ids""" + def test_complete_breakpoint_with_ids(self): + """These breakpoint subcommands should be completed with a list of breakpoint ids""" - subcommands = ['enable', 'disable', 'delete', 'modify'] + subcommands = ['enable', 'disable', 'delete', 'modify', 'name add', 'name delete', 'write'] # The tab completion here is unavailable without a target for subcommand in subcommands: