[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-07 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307390: Add a NativeProcessProtocol Factory class (authored by labath). Repository: rL LLVM https://reviews.llvm.org/D33778 Files: lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h lldb/

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added inline comments. This revision is now accepted and ready to land. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:87 + assert(wpid == pid); + (void)wpid; + if (wpid != pid || !WIFSTOPPED(wstatus)) { --

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:85 + int wstatus; + ::pid_t wpid = llvm::sys::RetryAfterSignal(-1, ::waitpid, pid, &wstatus, 0); + assert(wpid == pid); labath wrote: > krytarowski wrote: > >

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 105095. labath marked 2 inline comments as done. labath added a comment. remove extra pid check https://reviews.llvm.org/D33778 Files: include/lldb/Host/common/NativeProcessProtocol.h source/Host/common/NativeProcessProtocol.cpp source/Plugins/Process/

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Pavel Labath via Phabricator via lldb-commits
labath marked 6 inline comments as done. labath added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:85 + int wstatus; + ::pid_t wpid = llvm::sys::RetryAfterSignal(-1, ::waitpid, pid, &wstatus, 0); + assert(wpid == pid); kry

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:85 + int wstatus; + ::pid_t wpid = llvm::sys::RetryAfterSignal(-1, ::waitpid, pid, &wstatus, 0); + assert(wpid == pid); We can set BSD specific: `-1` -> `WAIT_

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 105065. labath marked 9 inline comments as done. labath added a comment. Address review comments https://reviews.llvm.org/D33778 Files: include/lldb/Host/common/NativeProcessProtocol.h source/Host/common/NativeProcessProtocol.cpp source/Plugins/Process

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:112 + if (wpid != pid || !WIFSTOPPED(wstatus)) { +std::error_code EC(errno, std::generic_category()); +LLDB_LOG( krytarowski wrote: > I can imagine that in so

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-02 Thread Pavel Labath via Phabricator via lldb-commits
labath planned changes to this revision. labath added a comment. I am going to come back to this later, I'm going to create one or two more cleanup diffs which this will depend on. https://reviews.llvm.org/D33778 ___ lldb-commits mailing list lldb-

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Eugene Zemtsov via Phabricator via lldb-commits
eugene added inline comments. Comment at: source/Plugins/Process/Linux/NativeProcessLinux.h:148 - ::pid_t Attach(lldb::pid_t pid, Status &error); + static llvm::Expected> Attach(::pid_t pid); labath wrote: > zturner wrote: > > Before it was only returning 1

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:112 + if (wpid != pid || !WIFSTOPPED(wstatus)) { +std::error_code EC(errno, std::generic_category()); +LLDB_LOG( I can imagine that in some cases there m

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: source/Plugins/Process/Linux/NativeProcessLinux.h:148 - ::pid_t Attach(lldb::pid_t pid, Status &error); + static llvm::Expected> Attach(::pid_t pid); zturner wrote: > Before it was only returning 1, now it's returni

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: source/Plugins/Process/Linux/NativeProcessLinux.h:148 - ::pid_t Attach(lldb::pid_t pid, Status &error); + static llvm::Expected> Attach(::pid_t pid); Before it was only returning 1, now it's returning a vector. An

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 101023. labath added a comment. forgot to reformat the code https://reviews.llvm.org/D33778 Files: include/lldb/Host/common/NativeProcessProtocol.h source/Host/common/NativeProcessProtocol.cpp source/Plugins/Process/Linux/NativeProcessLinux.cpp sourc

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added subscribers: mgorny, srhines. This replaces the static functions used for creating NativeProcessProtocol instances with a factory pattern, and modernizes the interface of the new class in the process -- I use llvm::Expected instead of the Status+value com