I looked how it is done in gdb, and found that this piece of code must be rewritten.
I have just a few questions that all boil down to checking if we need a guard #ifdef around a particular pattern in the code above. (See code-inlined comments).
Aside from that, LGTM.
Ubuntu 14.04 x86_64, clang-3.5-built lldb, all tests passed.
Do we need an analog of #ifdef PT_GETREGS (as the x86 side has) here?
The x86 code is guarded by a #ifdef PT_GETFPREGS. Do we have/need an analog for that here?
The x86-based call was guarded by an ifdef on the PT_SETREGS define. Do we need an analog here for PTRACE_SETREGSET?
Do we need an analog of #ifdef PT_SETFPREGS here?