changeset 22382:07eb510d8800

For win64 signal handling, use context Rip value * libinterp/corefcn/sighandlers.cc (do_jump_to_enclosing_context): use threadContext.Rip when win64
author John D
date Thu, 25 Aug 2016 07:55:01 -0400
parents 6eba7555794a
children 8d747185ae6b
files libinterp/corefcn/sighandlers.cc
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/sighandlers.cc	Thu Aug 25 06:45:15 2016 -0400
+++ b/libinterp/corefcn/sighandlers.cc	Thu Aug 25 07:55:01 2016 -0400
@@ -142,21 +142,22 @@
         jump_to_enclosing_context_sync ();
       else
         {
-          // 64-bit Windows does not appear to have threadContext.Eip.
-          // Something else must be done here to allow interrupts to
-          // properly work across threads.
-
-#if ! (defined (__MINGW64__) || defined (_WIN64))
 
           CONTEXT threadContext;
 
           SuspendThread (thread);
           threadContext.ContextFlags = CONTEXT_CONTROL;
           GetThreadContext (thread, &threadContext);
+
+#if (defined (__MINGW64__) || defined (_WIN64))
+          threadContext.Rip = (DWORD64) jump_to_enclosing_context_sync;
+#else
           threadContext.Eip = (DWORD) jump_to_enclosing_context_sync;
+#endif
+
           SetThreadContext (thread, &threadContext);
+
           ResumeThread (thread);
-#endif
         }
     }