https://github.com/charles-zablit updated 
https://github.com/llvm/llvm-project/pull/181813

>From 47d7800b591803051e3c0abae333718dd2efee79 Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Tue, 17 Feb 2026 12:28:16 +0000
Subject: [PATCH 1/3] [lldb-dap][windows] fix lldb-dap's self.get_stdout()
 method

---
 lldb/include/lldb/Host/ProcessLaunchInfo.h                  | 3 +--
 .../TestLLDBUtilFailedToHitBreakpoint.py                    | 1 -
 lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_args.py  | 3 ---
 lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_basic.py | 3 ---
 .../tools/lldb-dap/launch/TestDAP_launch_debuggerRoot.py    | 3 ---
 .../launch/TestDAP_launch_environment_with_object.py        | 3 ---
 .../launch/TestDAP_launch_shellExpandArguments_disabled.py  | 3 ---
 .../launch/TestDAP_launch_shellExpandArguments_enabled.py   | 5 +----
 .../launch/TestDAP_launch_stdio_redirection_and_console.py  | 6 ++----
 .../API/tools/lldb-dap/launch/TestDAP_launch_version.py     | 3 ---
 10 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/lldb/include/lldb/Host/ProcessLaunchInfo.h 
b/lldb/include/lldb/Host/ProcessLaunchInfo.h
index d89fe68b2d0d4..e13eecc9463ea 100644
--- a/lldb/include/lldb/Host/ProcessLaunchInfo.h
+++ b/lldb/include/lldb/Host/ProcessLaunchInfo.h
@@ -137,8 +137,7 @@ class ProcessLaunchInfo : public ProcessInfo {
   bool ShouldUsePTY() const {
 #ifdef _WIN32
     return GetPTY().GetPseudoTerminalHandle() != ((HANDLE)(long long)-1) &&
-           GetNumFileActions() == 0 &&
-           GetFlags().Test(lldb::eLaunchFlagLaunchInTTY);
+           GetNumFileActions() == 0;
 #else
     return true;
 #endif
diff --git 
a/lldb/test/API/lldbutil-tests/failed-to-hit-breakpoint/TestLLDBUtilFailedToHitBreakpoint.py
 
b/lldb/test/API/lldbutil-tests/failed-to-hit-breakpoint/TestLLDBUtilFailedToHitBreakpoint.py
index 632645ac7c7df..60a94e9c25b34 100644
--- 
a/lldb/test/API/lldbutil-tests/failed-to-hit-breakpoint/TestLLDBUtilFailedToHitBreakpoint.py
+++ 
b/lldb/test/API/lldbutil-tests/failed-to-hit-breakpoint/TestLLDBUtilFailedToHitBreakpoint.py
@@ -11,7 +11,6 @@
 class LLDBUtilFailedToHitBreakpointTest(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
-    @expectedFailureAll(oslist=["windows"])
     def test_error_message(self):
         """
         Tests that run_to_source_breakpoint prints the right error message
diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_args.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_args.py
index 221147f535958..6774f0516ae79 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_args.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_args.py
@@ -11,9 +11,6 @@ class TestDAP_launch_args(lldbdap_testcase.DAPTestCaseBase):
     Tests launch of a simple program with arguments
     """
 
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
     def test(self):
         program = self.getBuildArtifact("a.out")
         args = ["one", "with space", "'with single quotes'", '"with double 
quotes"']
diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_basic.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_basic.py
index d0e8a792e4e25..93ae5d05e9d6c 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_basic.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_basic.py
@@ -12,9 +12,6 @@ class TestDAP_launch_basic(lldbdap_testcase.DAPTestCaseBase):
     environment, or anything else is specified.
     """
 
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
     def test(self):
         program = self.getBuildArtifact("a.out")
         self.build_and_launch(program)
diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_debuggerRoot.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_debuggerRoot.py
index 39397120bf5d8..deeab23d3ec56 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_debuggerRoot.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_debuggerRoot.py
@@ -14,9 +14,6 @@ class 
TestDAP_launch_debuggerRoot(lldbdap_testcase.DAPTestCaseBase):
     the lldb-dap debug adapter.
     """
 
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
     def test(self):
         program = self.getBuildArtifact("a.out")
         program_parent_dir = 
os.path.realpath(os.path.dirname(os.path.dirname(program)))
diff --git 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_environment_with_object.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_environment_with_object.py
index f84aff742eed2..8c7994eac7926 100644
--- 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_environment_with_object.py
+++ 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_environment_with_object.py
@@ -7,9 +7,6 @@
 
 
 class TestDAP_launch(lldbdap_testcase.DAPTestCaseBase):
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
     def test_environment_with_object(self):
         """
         Tests launch of a simple program with environment variables
diff --git 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_disabled.py
 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_disabled.py
index b71bfc8152b69..d7b8579845956 100644
--- 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_disabled.py
+++ 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_disabled.py
@@ -13,9 +13,6 @@ class 
TestDAP_launch_shellExpandArguments_disabled(lldbdap_testcase.DAPTestCaseB
     disabled.
     """
 
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
     def test(self):
         program = self.getBuildArtifact("a.out")
         program_dir = os.path.dirname(program)
diff --git 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
index 443bb6f6fee54..b781ff1ac43ad 100644
--- 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
+++ 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
@@ -18,10 +18,7 @@ class 
TestDAP_launch_shellExpandArguments_enabled(lldbdap_testcase.DAPTestCaseBa
     """
 
     @skipIfLinux  # shell argument expansion doesn't seem to work on Linux
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
-    @expectedFailureAll(oslist=["freebsd", "netbsd"], 
bugnumber="llvm.org/pr48349")
+    @expectedFailureAll(oslist=["freebsd", "netbsd", "windows"], 
bugnumber="llvm.org/pr48349")
     def test(self):
         program = self.getBuildArtifact("a.out")
         program_dir = os.path.dirname(program)
diff --git 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
index 0ed8a5e11bf8b..1c6399dc61857 100644
--- 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
+++ 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
@@ -4,10 +4,10 @@
 
 from lldbsuite.test.decorators import (
     skipIfAsan,
-    expectedFailureWindows,
     skipIf,
     skipIfBuildType,
     no_match,
+    skipIfWindows,
 )
 import lldbdap_testcase
 import tempfile
@@ -19,9 +19,7 @@ class 
TestDAP_launch_stdio_redirection_and_console(lldbdap_testcase.DAPTestCaseB
     """
 
     @skipIfAsan
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
+    @skipIfWindows # https://github.com/llvm/llvm-project/issues/62336
     @skipIf(oslist=["linux"], archs=no_match(["x86_64"]))
     @skipIfBuildType(["debug"])
     def test(self):
diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_version.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_version.py
index a598db41595a5..fca153044da82 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_version.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_version.py
@@ -13,9 +13,6 @@ class 
TestDAP_launch_version(lldbdap_testcase.DAPTestCaseBase):
     as the one returned by "version" command.
     """
 
-    @expectedFailureWindows(
-        bugnumber="https://github.com/llvm/llvm-project/issues/137599";
-    )
     def test(self):
         program = self.getBuildArtifact("a.out")
         self.build_and_launch(program)

>From 1cddb755a21d4ce9a4412412ea400f0284c1baa5 Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Tue, 17 Feb 2026 12:33:00 +0000
Subject: [PATCH 2/3] fixup! [lldb-dap][windows] fix lldb-dap's
 self.get_stdout() method

---
 .../launch/TestDAP_launch_shellExpandArguments_enabled.py     | 4 +++-
 .../launch/TestDAP_launch_stdio_redirection_and_console.py    | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
index b781ff1ac43ad..7ddde219fc88d 100644
--- 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
+++ 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_shellExpandArguments_enabled.py
@@ -18,7 +18,9 @@ class 
TestDAP_launch_shellExpandArguments_enabled(lldbdap_testcase.DAPTestCaseBa
     """
 
     @skipIfLinux  # shell argument expansion doesn't seem to work on Linux
-    @expectedFailureAll(oslist=["freebsd", "netbsd", "windows"], 
bugnumber="llvm.org/pr48349")
+    @expectedFailureAll(
+        oslist=["freebsd", "netbsd", "windows"], bugnumber="llvm.org/pr48349"
+    )
     def test(self):
         program = self.getBuildArtifact("a.out")
         program_dir = os.path.dirname(program)
diff --git 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
index 1c6399dc61857..bec76fb4ef5e1 100644
--- 
a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
+++ 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_stdio_redirection_and_console.py
@@ -19,7 +19,7 @@ class 
TestDAP_launch_stdio_redirection_and_console(lldbdap_testcase.DAPTestCaseB
     """
 
     @skipIfAsan
-    @skipIfWindows # https://github.com/llvm/llvm-project/issues/62336
+    @skipIfWindows  # https://github.com/llvm/llvm-project/issues/62336
     @skipIf(oslist=["linux"], archs=no_match(["x86_64"]))
     @skipIfBuildType(["debug"])
     def test(self):

>From 8a6823f3712440783d00725dc22551da7137c860 Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Wed, 18 Feb 2026 12:05:22 +0000
Subject: [PATCH 3/3] remove assertion

---
 lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp 
b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 9a53252b2b4ae..8c1919eca7dda 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -215,10 +215,6 @@ Status ProcessWindows::DoLaunch(Module *exe_module,
   if (error.Success())
     SetID(launch_info.GetProcessID());
   m_pty = launch_info.TakePTY();
-  // At this point, Process owns the ConPTY. If ProcessLaunchInfo still has a
-  // reference to it, it might get closed prematurely if another target is
-  // created.
-  assert(m_pty.use_count() == 1 && "More than one reference to the ConPTY");
   return error;
 }
 

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to