[Lldb-commits] [lldb] Fix Windows build (PR #137414)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 25 16:08:44 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Emre Kultursay (emrekultursay)
<details>
<summary>Changes</summary>
Windows doesn't have domain sockets, so we must properly #ifdef the code that touches DomainSocket.
---
Full diff: https://github.com/llvm/llvm-project/pull/137414.diff
1 Files Affected:
- (modified) lldb/tools/lldb-server/lldb-platform.cpp (+6)
``````````diff
diff --git a/lldb/tools/lldb-server/lldb-platform.cpp b/lldb/tools/lldb-server/lldb-platform.cpp
index b9a85370d649c..10d79c63af994 100644
--- a/lldb/tools/lldb-server/lldb-platform.cpp
+++ b/lldb/tools/lldb-server/lldb-platform.cpp
@@ -469,6 +469,7 @@ int main_platform(int argc, char *argv[]) {
if (gdbserver_port) {
socket = std::make_unique<TCPSocket>(sockfd, /*should_close=*/true);
} else {
+#if LLDB_ENABLE_POSIX
llvm::Expected<std::unique_ptr<DomainSocket>> domain_socket =
DomainSocket::FromBoundNativeSocket(sockfd, /*should_close=*/true);
if (!domain_socket) {
@@ -477,6 +478,11 @@ int main_platform(int argc, char *argv[]) {
return socket_error;
}
socket = std::move(domain_socket.get());
+#else
+ WithColor::error() << "lldb-platform child: Unix domain sockets are not "
+ "supported on this platform.";
+ return socket_error;
+#endif
}
GDBRemoteCommunicationServerPlatform platform(socket->GetSocketProtocol(),
``````````
</details>
https://github.com/llvm/llvm-project/pull/137414
More information about the lldb-commits
mailing list