[NativeProcessLinux] Refactor PtraceWrapper
authorPavel Labath <labath@google.com>
Tue, 30 Jun 2015 17:04:49 +0000 (17:04 +0000)
committerPavel Labath <labath@google.com>
Tue, 30 Jun 2015 17:04:49 +0000 (17:04 +0000)
commit4a9babb26e91ecc27d95da7ad129941e8aa33b0e
tree0f2ef49ed3c3d95605dc2f058b936c4dc03b33d9
parent6c6c46e4dfa9e3e16a7b40bffd90438ce5d38095
[NativeProcessLinux] Refactor PtraceWrapper

Summary:
This changes PtraceWrapper to return an Error, while the actual result is in an pointer parameter
(instead of the other way around). Also made a couple of PtraceWrapper arguments default to zero.
This arrangement makes a lot of the code much simpler.

Test Plan: Tests pass on linux. It compiles on android arm64/mips64.

Reviewers: chaoren, mohit.bhakkad

Subscribers: tberghammer, aemerson, lldb-commits

Differential Revision: http://reviews.llvm.org/D10808

llvm-svn: 241079
lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp