[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 5 09:11:55 PDT 2018
zturner added inline comments.
================
Comment at: source/Core/Debugger.cpp:819
+ consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+ SetUseColor(SetConsoleMode(hConsole, consoleMode));
+#endif
----------------
xbolva00 wrote:
> Should I rewrite it to more clear version like
>
> bool ansi_supported = SetConsoleMode(hConsole, consoleMode);
> SetUseColor(ansi_supported);
>
> ?
Shouldn't we change this to call `llvm::sys::Process::UseANSIEscapeCodes(true);`?
================
Comment at: source/Core/Debugger.cpp:53
#include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
#endif
----------------
This should be `#include "lldb/Host/windows/windows.h"`. Otherwise you're getting the system `windows.h` file. If that's what you wanted, then it should be `<windows.h>` instead of `"windows.h"`, but that's never what you want, we should always be including LLDB's wrapper around windows.h instead.
https://reviews.llvm.org/D51615
More information about the lldb-commits
mailing list