[Lldb-commits] [PATCH] D57959: [lldb] [MainLoop] Initialize empty sigset_t correctly
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 8 11:39:01 PST 2019
mgorny updated this revision to Diff 186011.
mgorny added a comment.
Ok, I see that `_WIN32` actually redefines `sigset_t`, so I've added a separate branch for it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57959/new/
https://reviews.llvm.org/D57959
Files:
lldb/source/Host/common/MainLoop.cpp
Index: lldb/source/Host/common/MainLoop.cpp
===================================================================
--- lldb/source/Host/common/MainLoop.cpp
+++ lldb/source/Host/common/MainLoop.cpp
@@ -137,18 +137,20 @@
}
sigset_t MainLoop::RunImpl::get_sigmask() {
-#if SIGNAL_POLLING_UNSUPPORTED
- return 0;
-#else
sigset_t sigmask;
+#if defined(_WIN32)
+ sigmask = 0;
+#elif SIGNAL_POLLING_UNSUPPORTED
+ sigemptyset(&sigmask);
+#else
int ret = pthread_sigmask(SIG_SETMASK, nullptr, &sigmask);
assert(ret == 0);
(void) ret;
for (const auto &sig : loop.m_signals)
sigdelset(&sigmask, sig.first);
- return sigmask;
#endif
+ return sigmask;
}
#ifdef __ANDROID__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57959.186011.patch
Type: text/x-patch
Size: 693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190208/06258162/attachment-0001.bin>
More information about the lldb-commits
mailing list