Author: enrico
Date: Mon May 16 12:27:26 2016
New Revision: 269673

URL: http://llvm.org/viewvc/llvm-project?rev=269673&view=rev
Log:
Make LLDB print out an explicit marker when it's displaying formatters that are 
part of a disabled category

Fixes rdar://26202006


Modified:
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
    lldb/trunk/source/Commands/CommandObjectType.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py?rev=269673&r1=269672&r2=269673&view=diff
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
 Mon May 16 12:27:26 2016
@@ -62,6 +62,8 @@ class DataFormatterDisablingTestCase(Tes
 
         self.expect('frame variable string1', matching=False, substrs = 
['hello world'])
 
+        self.expect('type summary list', substrs=['Category: system 
(disabled)'])
+
         self.expect('type category list', substrs = ['system','disabled',])
         
         # now enable and check that we are back to normal

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=269673&r1=269672&r2=269673&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Mon May 16 12:27:26 2016
@@ -1351,7 +1351,9 @@ protected:
         bool any_printed = false;
         
         auto category_closure = [&result, &formatter_regex, &any_printed] 
(const lldb::TypeCategoryImplSP& category) -> void {
-            
result.GetOutputStream().Printf("-----------------------\nCategory: 
%s\n-----------------------\n", category->GetName());
+            
result.GetOutputStream().Printf("-----------------------\nCategory: 
%s%s\n-----------------------\n",
+                                            category->GetName(),
+                                            category->IsEnabled() ? "" : " 
(disabled)");
 
             TypeCategoryImpl::ForEachCallbacks<FormatterType> foreach;
             foreach.SetExact([&result, &formatter_regex, &any_printed] 
(ConstString name, const FormatterSharedPointer& format_sp) -> bool {


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to