Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove useless code (get SP register)
[simgrid.git] / src / mc / mc_checkpoint.c
index d2efa6e..5f924c4 100644 (file)
@@ -404,7 +404,7 @@ static xbt_dynar_t MC_get_local_variables_values(void *stack_context){
     xbt_abort();
   }
 
-  unw_word_t ip, sp, off;
+  unw_word_t ip, off;
   dw_frame_t frame;
 
   unsigned int cursor = 0;
@@ -420,7 +420,6 @@ static xbt_dynar_t MC_get_local_variables_values(void *stack_context){
   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);
 
@@ -475,8 +474,11 @@ static xbt_dynar_t MC_get_local_variables_values(void *stack_context){
       new_var->type = strdup(current_variable->type_origin);
       new_var->region= region_type;
       
-      if(current_variable->address.location != NULL){
-        new_var->address = (void*) MC_dwarf_resolve_location(&c, current_variable->address.location, frame_pointer_address);
+      /* if(current_variable->address!=NULL) {
+        new_var->address = current_variable->address;
+      } else */
+      if(current_variable->location != NULL){
+        new_var->address = (void*) MC_dwarf_resolve_location(&c, current_variable->location, frame_pointer_address);
       }
 
       xbt_dynar_push(variables, &new_var);