Ensure that errors are passed through correctly when performing
register read/write operations. Currently, any ptrace() errors are
silently discarded and LLDB behaves as if operation was successful.
// NB: This is a prerequisite for xstate support since xstate might not be supported on old kernels and ptrace() will fail then.