[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski abandoned this revision. krytarowski added a comment. This is considered to be a local patch. Repository: rL LLVM https://reviews.llvm.org/D43698 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Yes, but that's why we have the Error objects, so we don't have to do the errno save-restore dance. If this is just a debugging aid, then maybe you should keep it as such (locally). There are plenty of places that will leave a stray errno around and I don't think we wan

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. https://github.com/search?l=C&q=save_errno&ref=opensearch&type=Code Here is an approach with `save_errno`, useful in libraries when we preserve errno for public functions in the API of a library as-is, and not leaking it from the internals to unrelated code. Right

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This just helps debugging connectivity issues in other unrelated code-parts (I'm debugging why `select`(2) / `recv`(2) don't receive a packet of type `qHostInfo`). Floating errno is annoying. `TCPSocket::Connect()` has no bugs at least I'm not aware of them. Repo

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Yeah, never seen that before. Are you sure CreateSocket is doing the right thing and checking for the correct return value? That is the only way I can see this causing issues. Repository: rL LLVM https://reviews.llvm.org/D43698 __

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. This seems weird. I have never seen anyone resetting errno *after* a call. Wouldn't it be better to log strerror(errno) somewhere, or make sure that the Status object reflects the actual error? Repository: rL LLVM https://reviews.llvm.org/D43698 __

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added reviewers: labath, joerg. krytarowski added a project: LLDB. Herald added a subscriber: llvm-commits. Reset errno to 0 for error branches. Without this, debugging real issues in LLDB is harder as we don't know what and when caused the errno to