From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Subject: [PATCH 1/3] Rename struct ucontext to struct __mcontext
Date: Tue, 31 Mar 2015 17:47:00 -0000 [thread overview]
Message-ID: <1427824014-19504-2-git-send-email-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <1427824014-19504-1-git-send-email-jon.turney@dronecode.org.uk>
* include/cygwin/signal.h : Rename struct ucontext to struct
__mcontext. Remove unused member _internal. Fix differences from
the Win32 API CONTEXT type.
XXX: the ContextFlags member of the CONTEXT type is named cr2. This looks
wrong.
---
winsup/cygwin/ChangeLog | 6 ++++++
winsup/cygwin/include/cygwin/signal.h | 18 +++++++++++-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 505f4ce..1b4f4f3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-30 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * include/cygwin/signal.h : Rename struct ucontext to struct
+ __mcontext. Remove unused member _internal. Fix differences from
+ the Win32 API CONTEXT type.
+
2015-03-30 Corinna Vinschen <corinna@vinschen.de>
* cygtls.h (struct _cygtls): Convert thread_context to type CONTEXT.
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
index 58bbff0..3fefdf7 100644
--- a/winsup/cygwin/include/cygwin/signal.h
+++ b/winsup/cygwin/include/cygwin/signal.h
@@ -18,6 +18,10 @@
extern "C" {
#endif
+/*
+ Define a struct __mcontext, which should be identical in layout to the Win32
+ API type CONTEXT with the addition of an oldmask field at the end.
+*/
#ifdef __x86_64__
struct _uc_fpxreg {
@@ -45,7 +49,7 @@ struct _fpstate
__uint32_t padding[24];
};
-struct ucontext
+struct __mcontext
{
__uint64_t p1home;
__uint64_t p2home;
@@ -86,13 +90,13 @@ struct ucontext
__uint64_t r15;
__uint64_t rip;
struct _fpstate fpregs;
+ __uint64_t vregs[52];
__uint64_t vcx;
__uint64_t dbc;
__uint64_t btr;
__uint64_t bfr;
__uint64_t etr;
__uint64_t efr;
- __uint8_t _internal;
__uint64_t oldmask;
};
@@ -117,7 +121,7 @@ struct _fpstate
__uint32_t nxst;
};
-struct ucontext
+struct __mcontext
{
__uint32_t cr2;
__uint32_t dr0;
@@ -143,15 +147,15 @@ struct ucontext
__uint32_t eflags;
__uint32_t esp;
__uint32_t ss;
- __uint8_t _internal;
+ __uint32_t reserved[128];
__uint32_t oldmask;
};
#endif /* !x86_64 */
-/* Needed for GDB. It only compiles in the context copy code if this
- macro s defined. */
-#define __COPY_CONTEXT_SIZE ((size_t) (uintptr_t) &((struct ucontext *) 0)->_internal)
+/* Needed for GDB 7.9 and earlier. It only compiles in the context copy code if
+ this macro is defined. */
+#define __COPY_CONTEXT_SIZE ((size_t) (uintptr_t) &((struct ucontext *) 0)->oldmask)
typedef union sigval
{
--
2.1.4
next prev parent reply other threads:[~2015-03-31 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 17:47 [PATCH 0/3] Make detailled exception information available to signal handlers Jon TURNEY
2015-03-31 17:47 ` [PATCH 2/3] Make mcontext and stack " Jon TURNEY
2015-03-31 18:46 ` Corinna Vinschen
2015-03-31 17:47 ` Jon TURNEY [this message]
2015-03-31 18:37 ` [PATCH 1/3] Rename struct ucontext to struct __mcontext 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427824014-19504-2-git-send-email-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).