Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : stop stack comparison before the context switching with maestro
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Wed, 14 Aug 2013 09:36:19 +0000 (11:36 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Wed, 14 Aug 2013 09:36:51 +0000 (11:36 +0200)
src/mc/mc_checkpoint.c

index 5e65143..4b4c43c 100644 (file)
@@ -492,16 +492,20 @@ static xbt_dynar_t MC_get_local_variables_values(void *stack_context){
   int frame_found = 0, region_type;
   void *frame_pointer_address = NULL;
   long true_ip, value;
+  int stop;
 
   xbt_dynar_t variables = xbt_dynar_new(sizeof(local_variable_t), local_variable_free_voidp);
 
-  while(ret >= 0){
+  while(ret >= 0 && !stop){
 
     unw_get_reg(&c, UNW_REG_IP, &ip);
     unw_get_reg(&c, UNW_REG_SP, &sp);
 
     unw_get_proc_name(&c, frame_name, sizeof (frame_name), &off);
 
+    if(!strcmp(frame_name, "smx_ctx_sysv_wrapper")) /* Stop before context switch with maestro */
+      stop = 1;
+
     if((long)ip > (long)start_text_libsimgrid)
       frame = xbt_dict_get_or_null(mc_local_variables_libsimgrid, frame_name);
     else