]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/mc_hash.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use reference to types intead of type IDs
[simgrid.git] / src / mc / mc_hash.c
index 533548bff416932536addeab93637b934ac00dc2..5b824aeb124b8fa48e092a58dc469f56cd364eae 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:
@@ -132,7 +137,8 @@ static void mc_hash_value(mc_hash_t* hash, mc_hashing_state* state, mc_object_in
       XBT_DEBUG("Hash struct member %s", member->name);
       if(type->subtype==NULL)
         return;
-       mc_hash_value(hash, state, info, ((char*)address) + member->offset, type->subtype);
+      void* member_variable = mc_member_resolve(address, type, member, NULL);
+      mc_hash_value(hash, state, info, member_variable, type->subtype);
     }
     return;
   }
@@ -228,14 +234,14 @@ static void mc_hash_stack_frame(
       XBT_DEBUG("Hash local variable %s without type", variable->name);
       continue;
     }
-    if(variable->location == NULL) {
+    if(variable->locations.size == 0) {
       XBT_DEBUG("Hash local variable %s without location", variable->name);
       continue;
     }
 
     XBT_DEBUG("Hash local variable %s", variable->name);
 
-    void* variable_address = (void*) MC_dwarf_resolve_location(unw_cursor, variable->location, frame_pointer);
+    void* variable_address = (void*) mc_dwarf_resolve_locations(&variable->locations, unw_cursor, frame_pointer, NULL);
 
     dw_type_t type = variable->type;
     if(type==NULL) {