[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 4 03:47:22 PDT 2018
teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.
Thanks! Didn't know we can activate this setting for the user.
Some questions though: Should we restore this setting to the original value after LLDB shuts down? And what happens if this code runs on a Windows version before ENABLE_VIRTUAL_TERMINAL_PROCESSING was introduced? I see there some fallback code, but it's not clear to me what it does and what will happen on older platforms.
Comment at: source/Core/Debugger.cpp:56
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
Can you document why this has to be 0x0004? I assume older Windows versions won't have ENABLE_VIRTUAL_TERMINAL_PROCESSING, so that should also be documented that this code is covering this case.
Comment at: source/Core/Debugger.cpp:815
+ HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ DWORD consoleMode;
A comment here would be nice. E.g. `// Enabling use of ANSI color codes because LLDB is using them to highlight text.
More information about the lldb-commits