nix
nix copied to clipboard
Support GETFPREGS and SETFPREGS ptrace calls
Added two new functions to the ptrace
module: getfpregs
and setfpregs
gets and sets the floating point registers of the tracee.
Would it be possible to add a test?
Yes, sure. What kind of test do you have in mind? I see that most ptrace related tests just call ptrace
and then check that it doesn't return Error::UnsupportedOperation
. Would a similar check be sufficient, or would you like some more thorough testing? (e.g. creating a subprocess, then modify one of the XMM reigsters with setfpregs
, and reading it with getfpregs
to check that we successfully modified it).
Would it be possible to add a test?
Yes, sure. What kind of test do you have in mind? I see that most ptrace related tests just call
ptrace
and then check that it doesn't returnError::UnsupportedOperation
. Would a similar check be sufficient, or would you like some more thorough testing? (e.g. creating a subprocess, then modify one of the XMM reigsters withsetfpregs
, and reading it withgetfpregs
to check that we successfully modified it).
That would be perfect.
Two of the automatic tests failed, but as far as I understand, these failures are unrelated to my patch. Could you verify if this is indeed true? And if I'm wrong, could you give some advice how to fix the failures?
Thanks for the very good tests! As for the test failures, both should be fixed if you rebase your changes onto master.
Looks good, but I forgot one thing: this needs a CHANGELOG entry. And you can go ahead and squash while you're at it.
Closing in favor of https://github.com/nix-rust/nix/pull/1844