~CommandObjectFrameRecognizerDelete() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ if (request.GetCursorIndex() != 0)
+ return;
+
+ StackFrameRecognizerManager::ForEach(
+ [&request](uint32_t rid, std::string rname, std::string module,
+ llvm::ArrayRef<lldb_private::ConstString> symbols,
+ bool regexp) {
+ StreamString strm;
+ if (rname.empty())
+ rname = "(internal)";
+
+ strm << rname;
+ if (!module.empty())
+ strm << ", module " << module;
+ if (!symbols.empty())
+ for (auto &symbol : symbols)
+ strm << ", symbol " << symbol;
+ if (regexp)
+ strm << " (regexp)";
+
+ request.TryCompleteCurrentArg(std::to_string(rid), strm.GetString());
+ });
+ }
+
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
if (command.GetArgumentCount() == 0) {
lldbutil.run_to_source_breakpoint(self, '// Break here', self.main_source_spec)
self.complete_from_to('frame select ', ['0'])
+
+ def test_frame_recognizer_delete(self):
+ self.runCmd("frame recognizer add -l py_class -s module_name -n recognizer_name")
+ self.check_completion_with_desc('frame recognizer delete ', [['0', 'py_class, module module_name, symbol recognizer_name']])
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
def test_symbol_name(self):