[Lldb-commits] [lldb] [llvm] [lldb][windows] add Windows Virtual Console support (PR #168729)
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 17 08:55:47 PST 2025
================
@@ -0,0 +1,113 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/windows/PseudoConsole.h"
+
+#include <mutex>
+
+#include "lldb/Host/windows/windows.h"
+
+#include "llvm/Support/Errc.h"
+#include "llvm/Support/Errno.h"
+
+using namespace lldb_private;
+
+typedef HRESULT(WINAPI *CreatePseudoConsole_t)(COORD size, HANDLE hInput,
+ HANDLE hOutput, DWORD dwFlags,
+ HPCON *phPC);
+
+typedef VOID(WINAPI *ClosePseudoConsole_t)(HPCON hPC);
+
+struct Kernel32 {
+ Kernel32() {
+ hModule = LoadLibraryW(L"kernel32.dll");
----------------
compnerd wrote:
`LoadLibraryW` can fail _in theory_. Do we want an `assert` or something to indicate that?
https://github.com/llvm/llvm-project/pull/168729
More information about the lldb-commits
mailing list