[Lldb-commits] [lldb] [lldb-dap][Windows] use Unicode path limit (PR #206046)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 26 05:21:26 PDT 2026
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 <c_zablit at apple.com>
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 {
More information about the lldb-commits
mailing list