Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : fix get_local_variables
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Wed, 30 Jan 2013 22:34:25 +0000 (23:34 +0100)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Thu, 31 Jan 2013 23:45:34 +0000 (00:45 +0100)
src/mc/mc_checkpoint.c
src/mc/mc_global.c

index d0e92b6..1e8e29f 100644 (file)
@@ -552,7 +552,7 @@ static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap)
                 xbt_strbuff_append(variables, to_append);
                 xbt_free(to_append);
               }else if(((long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) > 0xffffffff) || ((long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) < (long)start_text_binary)){
                 xbt_strbuff_append(variables, to_append);
                 xbt_free(to_append);
               }else if(((long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) > 0xffffffff) || ((long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) < (long)start_text_binary)){
-                to_append = bprintf("%s=%d\n", current_variable->name, (int)(long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address));
+                to_append = bprintf("%s=%u\n", current_variable->name, (unsigned int)(long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address));
                 xbt_strbuff_append(variables, to_append);
                 xbt_free(to_append);
               }else{ 
                 xbt_strbuff_append(variables, to_append);
                 xbt_free(to_append);
               }else{ 
index 461e0b5..e4f4f50 100644 (file)
@@ -1521,7 +1521,7 @@ static dw_location_t get_location(xbt_dict_t location_list, char *expr){
         dw_location_t new_element = xbt_new0(s_dw_location_t, 1);
         new_element->type = e_dw_bregister_op;
         new_element->location.breg_op.reg = atoi(strtok(tok2, "DW_OP_breg"));
         dw_location_t new_element = xbt_new0(s_dw_location_t, 1);
         new_element->type = e_dw_bregister_op;
         new_element->location.breg_op.reg = atoi(strtok(tok2, "DW_OP_breg"));
-        new_element->location.breg_op.offset = atoi(xbt_dynar_get_as(tokens2, 1, char*));
+        new_element->location.breg_op.offset = atoi(xbt_dynar_get_as(tokens2, 2, char*));
         xbt_dynar_push(loc->location.compose, &new_element);
       }else if(strncmp(tok2, "DW_OP_lit", 9) == 0){
         dw_location_t new_element = xbt_new0(s_dw_location_t, 1);
         xbt_dynar_push(loc->location.compose, &new_element);
       }else if(strncmp(tok2, "DW_OP_lit", 9) == 0){
         dw_location_t new_element = xbt_new0(s_dw_location_t, 1);