xbolva00 created this revision.
xbolva00 added reviewers: stella.stamenova, zturner.
Herald added subscribers: lldb-commits, abidh.

Previously we SetUseColor(true) wrongly when output was not a terminal so it 
broken some (not public) bots.

Thanks for issue report, @stella.stamenova


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51772

Files:
  source/Core/Debugger.cpp
  source/Host/common/File.cpp


Index: source/Host/common/File.cpp
===================================================================
--- source/Host/common/File.cpp
+++ source/Host/common/File.cpp
@@ -806,6 +806,9 @@
     if (_isatty(fd)) {
       m_is_interactive = eLazyBoolYes;
       m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+      m_supports_colors = eLazyBoolYes;
+#endif
     }
 #else
     if (isatty(fd)) {
Index: source/Core/Debugger.cpp
===================================================================
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 


Index: source/Host/common/File.cpp
===================================================================
--- source/Host/common/File.cpp
+++ source/Host/common/File.cpp
@@ -806,6 +806,9 @@
     if (_isatty(fd)) {
       m_is_interactive = eLazyBoolYes;
       m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+      m_supports_colors = eLazyBoolYes;
+#endif
     }
 #else
     if (isatty(fd)) {
Index: source/Core/Debugger.cpp
===================================================================
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to