[PATCH 2/3] Provide ucontext to signal handlers

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Apr 1 14:22:00 GMT 2015


On Apr  1 14:19, Jon TURNEY wrote:
> Add ucontext.h header, defining ucontext_t and mcontext_t types.
> 
> Provide sigaction sighandlers with a ucontext_t parameter, containing stack and
> context information.
> 
> 	* include/sys/ucontext.h : New header.
> 	* include/ucontext.h : Ditto.
> 	* exceptions.cc (call_signal_handler): Provide ucontext_t
> 	parameter to signal handler function.

Patch is ok with a single change:  Please add a "FIXME?" comment to:

  else
    RtlCaptureContext();

On second thought, calling RtlCaptureContext here is probably wrong.

What we really need is the context of the thread when calling
call_signal_handler I think.  It would be better to call RtlCaptureContext
before calling call_signal_handler.  But this requires a change in how
call_signal_handler is called.

We should discuss this at one point, I think.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20150401/f068c71f/attachment.sig>


More information about the Cygwin-patches mailing list