Aha, and trying to do this ptrace call in case 1 (like in my patch) doesit will:
not return the correct CONTEXT?
1/ return the context (register part) from the exception
2/ recopy the current thread context
which means that it will correct only if the thread hasn't used FPU operations between the exception and sending the exception to the server
anyway, what I don't like in you patch is that well get FPU status not linked to the exact exception point
apparently, the REGISTER kludge is needed because Dr (aka REGISTER) have to be read by ptrace in all cases (exception or not), which is not the case for the FPU registers
A+
--
Eric Pouech