]> sourceware.org Git - newlib-cygwin.git/commitdiff
* exceptions.cc (_cygtls::signal_debugger): Move memcpy to copy context
authorCorinna Vinschen <corinna@vinschen.de>
Fri, 28 Mar 2014 16:56:03 +0000 (16:56 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Fri, 28 Mar 2014 16:56:03 +0000 (16:56 +0000)
from incoming siginfo_t to thread_context, too.

winsup/cygwin/ChangeLog
winsup/cygwin/exceptions.cc

index 188542a6589a353900379744ccb351f9e72b61e2..ec59df527a691cfb9ca599a488bebf1b73369e5a 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-28  Corinna Vinschen  <corinna@vinschen.de>
+
+       * exceptions.cc (_cygtls::signal_debugger): Move memcpy to copy context
+       from incoming siginfo_t to thread_context, too.
+
 2014-03-27  Corinna Vinschen  <corinna@vinschen.de>
 
        * gendef (_sigbe/x86_64): Fix typo in .seh_proc pseudo-op.
index fac65bf01d56bd82180bcb437307fa6d3b25ad6a..d335a080784cd0942a7982371c17f11387ff0161 100644 (file)
@@ -1487,9 +1487,7 @@ _cygtls::signal_debugger (siginfo_t& si)
        {
          SuspendThread (th);
          c.ContextFlags = CONTEXT_FULL;
-         if (GetThreadContext (th, &c))
-           pc = &c;
-         else
+         if (!GetThreadContext (th, &c))
            goto out;
          if (incyg)
 #ifdef __x86_64__
@@ -1497,9 +1495,10 @@ _cygtls::signal_debugger (siginfo_t& si)
 #else
            c.Eip = retaddr ();
 #endif
-         memcpy (&thread_context, pc, (&thread_context._internal -
-                                       (unsigned char *) &thread_context));
+         pc = &c;
        }
+      memcpy (&thread_context, pc, (&thread_context._internal -
+                                   (unsigned char *) &thread_context));
 #ifdef __x86_64__
       char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING " ffffffff ffffffffffffffff")];
 #else
This page took 0.035616 seconds and 5 git commands to generate.