summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2019-02-14 13:52:31 +0000
committerMichal Gorny <mgorny@gentoo.org>2019-02-14 13:52:31 +0000
commitc23f82c026049d574eef73af3b85e63598d9b0a3 (patch)
tree15a149d23e2bd56382da962dfccb28e8dcdd447e /lldb/source/Host/common
parent4efa0b674d7082fd8a736bc5789097e4d4d9d41c (diff)
downloadbcm5719-llvm-c23f82c026049d574eef73af3b85e63598d9b0a3.tar.gz
bcm5719-llvm-c23f82c026049d574eef73af3b85e63598d9b0a3.zip
[lldb] [MainLoop] Report errno for failed kevent()
Modify the kevent() error reporting to use errno rather than returning the return value. At least on FreeBSD and NetBSD, kevent() always returns -1 in case of error, and the actual error is returned via errno. Differential Revision: https://reviews.llvm.org/D58229 llvm-svn: 354029
Diffstat (limited to 'lldb/source/Host/common')
-rw-r--r--lldb/source/Host/common/MainLoop.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Host/common/MainLoop.cpp b/lldb/source/Host/common/MainLoop.cpp
index 6f8d1168a2b..8a40d427abe 100644
--- a/lldb/source/Host/common/MainLoop.cpp
+++ b/lldb/source/Host/common/MainLoop.cpp
@@ -108,7 +108,7 @@ Status MainLoop::RunImpl::Poll() {
out_events, llvm::array_lengthof(out_events), nullptr);
if (num_events < 0)
- return Status("kevent() failed with error %d\n", num_events);
+ return Status(errno, eErrorTypePOSIX);
return Status();
}
OpenPOWER on IntegriCloud