[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes
Dávid Bolvanský via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 5 09:24:18 PDT 2018
xbolva00 updated this revision to Diff 164053.
xbolva00 added a comment.
- use llvm::sys::Process::UseANSIEscapeCodes
https://reviews.llvm.org/D51615
Files:
source/Core/Debugger.cpp
Index: source/Core/Debugger.cpp
===================================================================
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,7 @@
#if defined(_WIN32)
#include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
#endif
#include "llvm/ADT/None.h" // for None
@@ -804,6 +805,13 @@
// Turn off use-color if we don't write to a terminal with color support.
if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+ // Enabling use of ANSI color codes because LLDB is using them to highlight
+ // text.
+ llvm::sys::Process::UseANSIEscapeCodes(true);
+ SetUseColor(true);
+#endif
}
Debugger::~Debugger() { Clear(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51615.164053.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180905/54d2bc97/attachment-0001.bin>
More information about the lldb-commits
mailing list