[Lldb-commits] [PATCH] D123025: [lldb-vscode] Implement stderr/stdout on win32 and redirect lldb log to VSCode
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 4 21:43:32 PDT 2022
wallace added inline comments.
================
Comment at: lldb/tools/lldb-vscode/OutputRedirector.cpp:12
+#else
+#include <fcntl.h>
+#include <io.h>
----------------
mstorsjo wrote:
> Minor style issue - I guess it'd be less of double negation, if we'd change the ifdef to `#if defined(_WIN32) .. #else`
feel free to refactor that part
================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1444-1449
+ auto log_cb = [](const char *buf, void *baton) -> void {
+ g_vsc.SendOutput(OutputType::Console, llvm::StringRef{buf});
+ };
+ g_vsc.debugger =
+ lldb::SBDebugger::Create(true /*source_init_files*/, log_cb, nullptr);
g_vsc.progress_event_thread = std::thread(ProgressEventThreadFunction);
----------------
could you test by creating a .lldbinit file with garbage so that the debugger prints error messages during initialization, and then make sure that they are properly redirected to the console of the IDE?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123025/new/
https://reviews.llvm.org/D123025
More information about the lldb-commits
mailing list