From: Gabriel Corona Date: Tue, 25 Feb 2014 12:21:12 +0000 (+0100) Subject: [mc] Handle DW_TAG_class_type as DW_TAG_structure_type (C++) X-Git-Tag: v3_11~199^2~2^2~22^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c41f7443856a7aa4f50ddfd9a60bbf72308929b4 [mc] Handle DW_TAG_class_type as DW_TAG_structure_type (C++) --- diff --git a/src/include/mc/datatypes.h b/src/include/mc/datatypes.h index baeb22d8cc..9244ae5550 100644 --- a/src/include/mc/datatypes.h +++ b/src/include/mc/datatypes.h @@ -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 */ - 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; diff --git a/src/mc/mc_compare.c b/src/mc/mc_compare.c index cea9e12596..1d5570a7cc 100644 --- a/src/mc/mc_compare.c +++ b/src/mc/mc_compare.c @@ -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_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; @@ -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: + 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); diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index 76865c9283..7fbe7794a9 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -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_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); @@ -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: + 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){ @@ -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 : + 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);