[Lldb-commits] [PATCH] D49866: Fix duplicate suggestions after an ambiguous command

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 26 10:14:48 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL338043: Fix duplicate suggestions after an ambiguous command (authored by teemperor, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D49866?vs=157518&id=157524#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49866

Files:
  lldb/trunk/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
  lldb/trunk/source/Interpreter/CommandInterpreter.cpp


Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
@@ -26,7 +26,7 @@
         self.assertRegexpMatches(result.GetError(), "Ambiguous command 'g'. Possible matches:")
         self.assertRegexpMatches(result.GetError(), "gui")
         self.assertRegexpMatches(result.GetError(), "gdb-remote")
-        # FIXME: Somehow we get 'gui' and 'gdb-remote' twice in the output.
+        self.assertEquals(1, result.GetError().count("gdb-remote"))
 
     @no_debug_info_test
     def test_unknown_command(self):
Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
===================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp
@@ -2932,8 +2932,6 @@
           actual_cmd_name_len = cmd_obj->GetCommandName().size();
         }
       } else {
-        if (!cmd_obj)
-          cmd_obj = GetCommandObject(next_word, &matches);
         if (cmd_obj) {
           llvm::StringRef cmd_name = cmd_obj->GetCommandName();
           actual_cmd_name_len += cmd_name.size();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49866.157524.patch
Type: text/x-patch
Size: 1398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180726/f9a9f7a7/attachment.bin>


More information about the lldb-commits mailing list