Sergey Bugaev wrote:
> state->basic is the Mach i386_thread_state structure; the
> signal handling machinery first initializes it using thread_get_state
> ()) to describe the state that the thread had at the time it was
> interrupted. It then initializes the sigcontext based on this state
> (memcpy'ing from state->basic), and then mutates state->basic to point
> %rip to the trampoline, %rsp to sigsp, etc., and then uses this same
> state->basic structure in a thread_set_state () call to apply the new
> state, to set the thread off to run the handler. But these
> modifications never reach the struct sigcontext, which still
> represents the state of the thread when it was interrupted.

Thanks for explaining, again. I've corrected the comments in libsigsegv
and gnulib accordingly.

Bruno




Reply via email to