[PATCH 0/5] Fix to Cygwin-specific signal handling (v2)

Jon TURNEY jon.turney@dronecode.org.uk
Wed Jun 10 13:06:00 GMT 2015


On 16/04/2015 20:23, Jon Turney wrote:
> After these patches, there still remain some problems with Cygwin-specific
> signal handling, which hopefully I can address in future patches.

The remaining problem appears to be that since the signal context
reported by Cygwin is the context which will be resumed after any signal
handler has been run, to restore it to the inferior (as master currently
does) skips over the actual signal delivery and handling.

Cygwin currently carries a patch which clears the ContextFlags in the
signal context, so we never attempt to restore it to the inferior.

The test-suite reveals that isn't quite right, either, unfortunately.

In some cases, GDB decides it needs to single-step when continuing from
the signal, which requires it update the inferior's context with
FLAG_TRACE_BIT set, which can only currently happen when ContextFlags
has the CONTEXT_CONTROL flag set.

This seems to me to be not straightforward to fix. It's not entirely
clear to me that Cygwin's current behaviour is correct, either.



More information about the Gdb-patches mailing list