https://github.com/charles-zablit created 
https://github.com/llvm/llvm-project/pull/200803

Use the captured value on both branches so the reported error matches the one 
that was tested against.

>From e5cf5aac563d25d91acd9f09d8b4ffd939c882aa Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Mon, 1 Jun 2026 13:50:03 +0100
Subject: [PATCH] [lldb][Windows] Use captured error in
 ConnectionGenericFile::Read

---
 lldb/source/Host/windows/ConnectionGenericFileWindows.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp 
b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
index 8507dffde4166..8a177bcf571ba 100644
--- a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
+++ b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
@@ -175,7 +175,7 @@ size_t ConnectionGenericFile::Read(void *dst, size_t 
dst_len,
       return finish(0, eConnectionStatusEndOfFile, 0);
     }
     // An unknown error occurred.  Fail out.
-    return finish(0, eConnectionStatusError, ::GetLastError());
+    return finish(0, eConnectionStatusError, read_error);
   }
 
   if (!read_result || m_read_pending) {

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

Reply via email to