llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

`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.

---
Full diff: https://github.com/llvm/llvm-project/pull/206046.diff


1 Files Affected:

- (modified) lldb/tools/lldb-dap/EventHelper.cpp (+1-9) 


``````````diff
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 {

``````````

</details>


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

Reply via email to