[Lldb-commits] [lldb] r354029 - [lldb] [MainLoop] Report errno for failed kevent()

Hans Wennborg via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 18 02:30:27 PST 2019


Merged to release_80 in r354254.

On Thu, Feb 14, 2019 at 2:51 PM Michal Gorny via lldb-commits
<lldb-commits at lists.llvm.org> wrote:
>
> Author: mgorny
> Date: Thu Feb 14 05:52:31 2019
> New Revision: 354029
>
> URL: http://llvm.org/viewvc/llvm-project?rev=354029&view=rev
> Log:
> [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
>
> Modified:
>     lldb/trunk/source/Host/common/MainLoop.cpp
>
> Modified: lldb/trunk/source/Host/common/MainLoop.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MainLoop.cpp?rev=354029&r1=354028&r2=354029&view=diff
> ==============================================================================
> --- lldb/trunk/source/Host/common/MainLoop.cpp (original)
> +++ lldb/trunk/source/Host/common/MainLoop.cpp Thu Feb 14 05:52:31 2019
> @@ -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();
>  }
>
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


More information about the lldb-commits mailing list