public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH 0/3] Make detailled exception information available to signal handlers
@ 2015-03-31 17:47 Jon TURNEY
  2015-03-31 17:47 ` [PATCH 1/3] Rename struct ucontext to struct __mcontext Jon TURNEY
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jon TURNEY @ 2015-03-31 17:47 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

Thanks for your help so far.  Here's another attempt at this.

Questions:

The ContextFlags member of the CONTEXT type is named cr2 in struct __mcontext. I 
don't understand how that can be right.

For a non-exception signal, we won't have aCONTEXT to provide.  Is one that is 
all zeroes acceptable?

Jon TURNEY (3):
  Rename struct ucontext to struct __mcontext
  Make mcontext and stack information available to signal handlers
  Add cygwin_internal() operation to convert siginfo_t * to
    EXCEPTION_RECORD *

 winsup/cygwin/ChangeLog               | 20 ++++++++++++++++++++
 winsup/cygwin/exception.h             |  1 +
 winsup/cygwin/exceptions.cc           | 20 ++++++++++++++++++--
 winsup/cygwin/external.cc             | 13 +++++++++++++
 winsup/cygwin/include/cygwin/signal.h | 18 +++++++++++-------
 winsup/cygwin/include/sys/cygwin.h    |  4 +++-
 winsup/cygwin/include/sys/ucontext.h  | 26 ++++++++++++++++++++++++++
 winsup/cygwin/include/ucontext.h      | 16 ++++++++++++++++
 8 files changed, 108 insertions(+), 10 deletions(-)
 create mode 100644 winsup/cygwin/include/sys/ucontext.h
 create mode 100644 winsup/cygwin/include/ucontext.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/3] Make detailed exception information available to signal handlers (v4)
@ 2015-04-01 13:20 Jon TURNEY
  2015-04-01 13:20 ` [PATCH 1/3] Rename struct ucontext to struct __mcontext Jon TURNEY
  0 siblings, 1 reply; 10+ messages in thread
From: Jon TURNEY @ 2015-04-01 13:20 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

Thanks for your comments so far.

Changes since v3:

Rename cr2 member of struct __ucontext to ctxflags
Add cr2 member after oldmask to struct __ucontext
Keep __COPY_CONSTRUCT_SIZE as it's historical value

Add uc_flags member to ucontext_t in case of future need
Set uc_sigmask
Use RtlCopyContext() if we don't have a context
Add a FIXME for uc_stack mentioning sigaltstack
Simplify additions to call_signal_handler() since a ucontext_t is now always passed
Just include signal.h in sys/ucontext.h

Change CW_EXCEPTION_RECORD_FROM_SIGINFO_T to return a copy of the EXCEPTION_RECORD
#define CW_EXCEPTION_RECORD_FROM_SIGINFO_T 

Jon TURNEY (3):
  Rename struct ucontext to struct __mcontext
  Provide ucontext to signal handlers
  Add cygwin_internal() operation to retrieve the EXCEPTION_RECORD from
    a siginfo_t *

 winsup/cygwin/ChangeLog               | 21 +++++++++++++++++++++
 winsup/cygwin/exception.h             |  1 +
 winsup/cygwin/exceptions.cc           | 22 ++++++++++++++++++++--
 winsup/cygwin/external.cc             | 14 ++++++++++++++
 winsup/cygwin/include/cygwin/signal.h | 28 +++++++++++++++++++---------
 winsup/cygwin/include/sys/cygwin.h    |  5 ++++-
 winsup/cygwin/include/sys/ucontext.h  | 26 ++++++++++++++++++++++++++
 winsup/cygwin/include/ucontext.h      | 16 ++++++++++++++++
 8 files changed, 121 insertions(+), 12 deletions(-)
 create mode 100644 winsup/cygwin/include/sys/ucontext.h
 create mode 100644 winsup/cygwin/include/ucontext.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-01 14:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 17:47 [PATCH 0/3] Make detailled exception information available to signal handlers Jon TURNEY
2015-03-31 17:47 ` [PATCH 1/3] Rename struct ucontext to struct __mcontext Jon TURNEY
2015-03-31 18:37   ` Corinna Vinschen
2015-03-31 17:47 ` [PATCH 2/3] Make mcontext and stack information available to signal handlers Jon TURNEY
2015-03-31 18:46   ` Corinna Vinschen
2015-03-31 17:47 ` [PATCH 3/3] Add cygwin_internal() operation to convert siginfo_t * to EXCEPTION_RECORD * Jon TURNEY
2015-03-31 19:11   ` Corinna Vinschen
2015-03-31 19:02 ` [PATCH 0/3] Make detailled exception information available to signal handlers Corinna Vinschen
2015-04-01 13:20 [PATCH 0/3] Make detailed exception information available to signal handlers (v4) Jon TURNEY
2015-04-01 13:20 ` [PATCH 1/3] Rename struct ucontext to struct __mcontext Jon TURNEY
2015-04-01 14:01   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).