X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9122d33957bd260d3d5296bc250674d9a4eb4d40..33d94a4ee75641987aed5b4890202d75de869aad:/src/mc/mc_hash.c diff --git a/src/mc/mc_hash.c b/src/mc/mc_hash.c index 4e8c536f39..c4ba6c6294 100644 --- a/src/mc/mc_hash.c +++ b/src/mc/mc_hash.c @@ -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; } @@ -197,7 +203,7 @@ static void mc_hash_object_globals(mc_hash_t *hash, mc_hashing_state* state, mc_ continue; } - dw_type_t type = xbt_dict_get_or_null(info->types, variable->type_origin); + dw_type_t type = variable->type; if(type==NULL) { // Nothing continue; @@ -228,16 +234,17 @@ 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, variable->object_info, unw_cursor, frame_pointer, NULL); - dw_type_t type = xbt_dict_get_or_null(info->types, variable->type_origin); + dw_type_t type = variable->type; if(type==NULL) { XBT_DEBUG("Hash local variable %s without loctypeation", variable->name); continue; @@ -245,6 +252,8 @@ static void mc_hash_stack_frame( mc_hash_value(hash, state, info, variable_address, type); } + + // TODO, handle nested scopes } static void mc_hash_stack(mc_hash_t *hash, mc_snapshot_stack_t stack, mc_hashing_state* state) {