[Lldb-commits] [lldb] [lldb-dap][windows] add integratedTerminal support (PR #174635)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 13 09:54:29 PST 2026
================
@@ -285,6 +304,107 @@ static llvm::Error LaunchRunInTerminalTarget(llvm::opt::Arg &target_arg,
#endif
lldb_private::FileSystem::Initialize();
+
+#ifdef _WIN32
+ RunInTerminalLauncherCommChannel comm_channel(comm_file);
+
+ auto wcommandLineOrErr =
+ lldb_private::GetFlattenedWindowsCommandStringW(argv);
+ if (!wcommandLineOrErr)
+ return notifyError(comm_channel, "Failed to process arguments");
+
+ STARTUPINFOEXW startupinfoex = {};
+ startupinfoex.StartupInfo.cb = sizeof(STARTUPINFOEXW);
+ startupinfoex.StartupInfo.dwFlags |= STARTF_USESTDHANDLES;
+
+ HANDLE stdin_handle = GetStdHandle(STD_INPUT_HANDLE);
+ HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
+ HANDLE stderr_handle = GetStdHandle(STD_ERROR_HANDLE);
+
+ auto attributelist_or_err =
+ lldb_private::ProcThreadAttributeList::Create(startupinfoex);
+ if (!attributelist_or_err) {
+ return notifyError(comm_channel, "Could not open inherited handles",
+ attributelist_or_err.getError());
+ }
+
+ if (!stdio.empty()) {
+ llvm::SmallVector<llvm::StringRef, 3> files;
+ stdio.split(files, ':');
----------------
ashgti wrote:
We could make this platform dependent as well, for example, in Python the `PYTHONPATH` for looking up modules is seperated by `:` on POSIX and `;` on windows.
https://github.com/llvm/llvm-project/pull/174635
More information about the lldb-commits
mailing list