Skip to content

[lldb-dap] Fix win32 build. #135638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged

[lldb-dap] Fix win32 build. #135638

merged 1 commit into from
Apr 14, 2025

Conversation

ashgti
Copy link
Contributor

@ashgti ashgti commented Apr 14, 2025

This enum was not fully specified.

This enum was not fully specified.
@ashgti
Copy link
Contributor Author

ashgti commented Apr 14, 2025

@llvmbot
Copy link
Member

llvmbot commented Apr 14, 2025

@llvm/pr-subscribers-lldb

Author: John Harrison (ashgti)

Changes

This enum was not fully specified.


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

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/Transport.cpp (+1-1)
diff --git a/lldb/tools/lldb-dap/Transport.cpp b/lldb/tools/lldb-dap/Transport.cpp
index 96b8a48fdf61e..ffd0c49f1770b 100644
--- a/lldb/tools/lldb-dap/Transport.cpp
+++ b/lldb/tools/lldb-dap/Transport.cpp
@@ -38,7 +38,7 @@ ReadFull(IOObject &descriptor, size_t length,
   bool timeout_supported = true;
   // FIXME: SelectHelper does not work with NativeFile on Win32.
 #if _WIN32
-  timeout_supported = descriptor.GetFdType() == eFDTypeSocket;
+  timeout_supported = descriptor.GetFdType() == IOObject::eFDTypeSocket;
 #endif
 
   if (timeout && timeout_supported) {

@ashgti ashgti merged commit 6b863e8 into llvm:main Apr 14, 2025
13 checks passed
@ashgti ashgti deleted the lldb-dap-win32-build branch April 14, 2025 16:57
@slydiman
Copy link
Contributor

@ashgti Did you test #130169 on Windows?
This patch will fix the building, but I'm not sure that it will work on Windows considering this:

// TODO: On Windows this should be a HANDLE, and wait should use
// WaitForMultipleObjects
typedef int WaitableHandle;

IOObject::WaitableHandle Socket::GetWaitableHandle() {
  // TODO: On Windows, use WSAEventSelect
  return m_socket;
}

It seems you need a Windows specific implementation.

bcardosolopes added a commit to bcardosolopes/llvm-project that referenced this pull request Apr 14, 2025
* origin/main: (199 commits)
  [NFC][AsmPrinter] Refactor AsmPrinter and AArch64AsmPrinter to prepare for jump table partitions on aarch64 (llvm#125993)
  [HEXAGON] Fix corner cases for hwloops pass (llvm#135439)
  [flang] Handle volatility in lowering and codegen (llvm#135311)
  [MLIR][Shape] Support >2 args in `shape.broadcast` folder (llvm#126808)
  [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (llvm#134570)
  Remove the redundant check for "WeakPtr" in isSmartPtrClass to fix the issue 135612. (llvm#135629)
  [BOLT] Support relative vtable (llvm#135449)
  [flang] Fix linking to libMLIR (llvm#135483)
  [AsmPrinter] Link .section_sizes to the correct section (llvm#135583)
  [ctxprof] Handle instrumenting functions with `musttail` calls (llvm#135121)
  [SystemZ] Consider VST/VL as SimpleBDXStore/Load (llvm#135623)
  [libc++][CI] Pin the XCode version. (llvm#135412)
  [lldb-dap] Fix win32 build. (llvm#135638)
  [Interp] Mark inline-virtual.cpp as unsupported with ASan (llvm#135402)
  [libc++] Removes the _LIBCPP_VERBOSE_ABORT_NOT_NOEXCEPT macro. (llvm#135494)
  [CVP] Add tests for ucmp/scmp with switch (NFC)
  [mlir][tosa] Align AbsOp example variable names (llvm#135268)
  [mlir][tosa] Align AddOp examples to spec (llvm#135266)
  [mlir][tosa] Align RFFT2d and FFT2d operator examples (llvm#135261)
  [flang][OpenMP][HLFIR] Support vector subscripted array sections for DEPEND (llvm#133892)
  ...
@ashgti
Copy link
Contributor Author

ashgti commented Apr 14, 2025

@ashgti Did you test #130169 on Windows? This patch will fix the building, but I'm not sure that it will work on Windows considering this:

SelectHelper has a Windows implementation:

lldb_private::Status SelectHelper::Select() {
it only works with Socket types on Windows.

var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
This enum was not fully specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants