Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Add support for DW_TAG_unspecified_type (nullptr_t in C++11)
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 3 Mar 2014 14:59:15 +0000 (15:59 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 3 Mar 2014 14:59:15 +0000 (15:59 +0100)
src/mc/mc_compare.c
src/mc/mc_hash.c
src/xbt/mmalloc/mm_diff.c

index 3b0cd33..ca2d81a 100644 (file)
@@ -107,6 +107,9 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
   void *addr_pointed1, *addr_pointed2;
 
   switch(type->type){
+  case DW_TAG_unspecified_type:
+    return 1;
+
   case DW_TAG_base_type:
   case DW_TAG_enumeration_type:
   case DW_TAG_union_type:
@@ -120,6 +123,9 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
   case DW_TAG_array_type:
     subtype = type->subtype;
     switch(subtype->type){
+    case DW_TAG_unspecified_type:
+      return 1;
+
     case DW_TAG_base_type:
     case DW_TAG_enumeration_type:
     case DW_TAG_pointer_type:
index 533548b..627e708 100644 (file)
@@ -77,6 +77,11 @@ static void mc_hash_value(mc_hash_t* hash, mc_hashing_state* state, mc_object_in
   top:
 
   switch(type->type){
+
+  // Not relevant, do nothing:
+  case DW_TAG_unspecified_type:
+    return;
+
   // Simple case, hash this has binary:
   case DW_TAG_base_type:
   case DW_TAG_enumeration_type:
index 2415688..c681d8b 100644 (file)
@@ -781,6 +781,9 @@ static int compare_heap_area_with_type(struct s_mm_diff *state, void *real_area1
   void *addr_pointed1, *addr_pointed2;;
 
   switch(type->type){
+  case DW_TAG_unspecified_type:
+    return 1;
+
   case DW_TAG_base_type:
     if(type->name!=NULL && strcmp(type->name, "char") == 0){ /* String, hence random (arbitrary ?) size */
       if(real_area1 == real_area2)
@@ -809,6 +812,9 @@ static int compare_heap_area_with_type(struct s_mm_diff *state, void *real_area1
   case DW_TAG_array_type:
     subtype = xbt_dict_get_or_null(info->types, type->dw_type_id);
     switch(subtype->type){
+    case DW_TAG_unspecified_type:
+      return 1;
+
     case DW_TAG_base_type:
     case DW_TAG_enumeration_type:
     case DW_TAG_pointer_type: