I glanced cursorily at the NativeThreadProtocol.cpp and was confused with SaveAllRegisters method calls WriteAllRegisterValues and RestoreAllRegisters calls ReadAllRegisterValues. It seems they are inverted.

Yes, they indeed seem to be inverted. Thanks for noticing this.

It turns out this was not noticed because the functions were never used, so I just deleted them in r328761.