Author: enrico Date: Mon May 2 16:28:40 2016 New Revision: 268309 URL: http://llvm.org/viewvc/llvm-project?rev=268309&view=rev Log: Fix an issue where the apropos command would not print fully qualified command names for nested command objects
rdar://problem/26020072 Added: lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py?rev=268309&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py Mon May 2 16:28:40 2016 @@ -0,0 +1,22 @@ +""" +Test some lldb apropos commands. +""" + +from __future__ import print_function + + + +import os, time +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class AproposCommandTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @no_debug_info_test + def test_apropos_variable(self): + """Test that 'apropos variable' prints the fully qualified command name""" + self.expect('apropos variable', substrs=['frame variable', 'target variable', 'watchpoint set variable']) Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=268309&r1=268308&r2=268309&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon May 2 16:28:40 2016 @@ -2802,7 +2802,7 @@ CommandInterpreter::FindCommandsForAprop search_syntax, search_options)) { - commands_found.AppendString (command_name); + commands_found.AppendString (cmd_obj->GetCommandName()); commands_help.AppendString (cmd_obj->GetHelp()); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits