Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / src / xbt / win32_ucontext.c
index 1d8adce..560b06c 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2010-2012, 2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 /*\r
  *      win32-ucontext: Unix ucontext_t operations on Windows platforms\r
  *      Copyright(C) 2007 Panagiotis E. Hadjidoukas\r
@@ -27,7 +33,7 @@ int getcontext(ucontext_t * ucp)
   int ret;\r
   \r
       /* Retrieve the full machine context */ \r
-      ucp->uc_mcontext.ContextFlags = CONTEXT_FULL;\r
+      ucp->uc_mcontext.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;\r
   ret = GetThreadContext(GetCurrentThread(), &ucp->uc_mcontext);\r
   return (ret == 0) ? -1 : 0;\r
 }\r
@@ -72,7 +78,7 @@ int makecontext(ucontext_t * ucp, void (*func) (), int argc, ...)
   #endif\r
 \r
       /* Save/Restore the full machine context */ \r
-      ucp->uc_mcontext.ContextFlags = CONTEXT_FULL;\r
+      ucp->uc_mcontext.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;\r
   \r
       /* Copy the arguments */ \r
       va_start(ap, argc);\r