Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Handle DW_TAG_class_type as DW_TAG_structure_type (C++)
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 25 Feb 2014 12:21:12 +0000 (13:21 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 25 Feb 2014 12:21:12 +0000 (13:21 +0100)
src/include/mc/datatypes.h
src/mc/mc_compare.c
src/xbt/mmalloc/mm_diff.c

index baeb22d..9244ae5 100644 (file)
@@ -60,7 +60,7 @@ struct s_dw_type{
   int byte_size; /* Size in bytes */
   int element_count; /* Number of elements for array type */
   char *dw_type_id; /* DW_AT_type */
   int byte_size; /* Size in bytes */
   int element_count; /* Number of elements for array type */
   char *dw_type_id; /* DW_AT_type */
-  xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_union_type*/
+  xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type*/
   int is_pointer_type;
   int offset;
   dw_type_t subtype;
   int is_pointer_type;
   int offset;
   dw_type_t subtype;
index cea9e12..1d5570a 100644 (file)
@@ -126,6 +126,7 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
     case DW_TAG_reference_type:
     case DW_TAG_rvalue_reference_type:
     case DW_TAG_structure_type:
     case DW_TAG_reference_type:
     case DW_TAG_rvalue_reference_type:
     case DW_TAG_structure_type:
+    case DW_TAG_class_type:
     case DW_TAG_union_type:
       if(subtype->byte_size == 0){ /*declaration of the type, need the complete description */
           subtype = subtype->other_object_same_type;
     case DW_TAG_union_type:
       if(subtype->byte_size == 0){ /*declaration of the type, need the complete description */
           subtype = subtype->other_object_same_type;
@@ -202,6 +203,7 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
     }
     break;
   case DW_TAG_structure_type:
     }
     break;
   case DW_TAG_structure_type:
+  case DW_TAG_class_type:
     xbt_dynar_foreach(type->members, cursor, member){
       XBT_DEBUG("Compare member %s", member->name);
       res = compare_areas_with_type((char *)area1 + member->offset, (char *)area2 + member->offset, info, other_info, member->subtype, region_size, region_type, start_data, pointer_level);
     xbt_dynar_foreach(type->members, cursor, member){
       XBT_DEBUG("Compare member %s", member->name);
       res = compare_areas_with_type((char *)area1 + member->offset, (char *)area2 + member->offset, info, other_info, member->subtype, region_size, region_type, start_data, pointer_level);
index 76865c9..7fbe779 100644 (file)
@@ -815,6 +815,7 @@ static int compare_heap_area_with_type(struct s_mm_diff *state, void *real_area1
     case DW_TAG_reference_type:
     case DW_TAG_rvalue_reference_type:
     case DW_TAG_structure_type:
     case DW_TAG_reference_type:
     case DW_TAG_rvalue_reference_type:
     case DW_TAG_structure_type:
+    case DW_TAG_class_type:
     case DW_TAG_union_type:
       if(subtype->byte_size == 0){ /*declaration of the type, need the complete description */
           subtype = xbt_dict_get_or_null(other_info->types_by_name, subtype->name);
     case DW_TAG_union_type:
       if(subtype->byte_size == 0){ /*declaration of the type, need the complete description */
           subtype = xbt_dict_get_or_null(other_info->types_by_name, subtype->name);
@@ -878,6 +879,7 @@ static int compare_heap_area_with_type(struct s_mm_diff *state, void *real_area1
     }
     break;
   case DW_TAG_structure_type:
     }
     break;
   case DW_TAG_structure_type:
+  case DW_TAG_class_type:
     if(type->byte_size == 0){ /*declaration of the structure, need the complete description */
       dw_type_t full_type = xbt_dict_get_or_null(info->types_by_name, type->name);
       if(full_type){
     if(type->byte_size == 0){ /*declaration of the structure, need the complete description */
       dw_type_t full_type = xbt_dict_get_or_null(info->types_by_name, type->name);
       if(full_type){
@@ -932,6 +934,7 @@ static char* get_offset_type(char* type_id, int offset, mc_object_info_t info, m
   }
   switch(type->type){
   case DW_TAG_structure_type :
   }
   switch(type->type){
   case DW_TAG_structure_type :
+  case DW_TAG_class_type:
     if(type->byte_size == 0){ /*declaration of the structure, need the complete description */
       if(*switch_type == 0){
         dw_type_t full_type = xbt_dict_get_or_null(info->types_by_name, type->name);
     if(type->byte_size == 0){ /*declaration of the structure, need the complete description */
       if(*switch_type == 0){
         dw_type_t full_type = xbt_dict_get_or_null(info->types_by_name, type->name);