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

`MAX_PATH` is defined as 260. `PosixApi.h` already defines `PATH_MAX` as 
`32,768` characters which is the max path limit for Unicode paths on Windows.

Use this in `lldb-dap` on Windows to avoid path truncation.

>From 41f5fcb3fe43f03425ec6006fef7c318b98a5e9e Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Fri, 26 Jun 2026 11:48:16 +0100
Subject: [PATCH] [lldb-dap][Windows] use Unicode path limit

---
 lldb/tools/lldb-dap/EventHelper.cpp | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/lldb/tools/lldb-dap/EventHelper.cpp 
b/lldb/tools/lldb-dap/EventHelper.cpp
index 2e0f71d69db65..7295467fa0309 100644
--- a/lldb/tools/lldb-dap/EventHelper.cpp
+++ b/lldb/tools/lldb-dap/EventHelper.cpp
@@ -27,6 +27,7 @@
 #include "lldb/API/SBPlatform.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBThread.h"
+#include "lldb/Host/PosixApi.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-types.h"
 #include "llvm/Support/Error.h"
@@ -37,15 +38,6 @@
 #include <mutex>
 #include <utility>
 
-#if defined(_WIN32)
-#define NOMINMAX
-#include <windows.h>
-
-#ifndef PATH_MAX
-#define PATH_MAX MAX_PATH
-#endif
-#endif
-
 using namespace llvm;
 
 namespace lldb_dap {

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

Reply via email to