X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7d2e5d9b1a1844f380405f44fe0373e7632578f6..00e73cde9763ace0823328ea4f8811b966c1ff37:/src/mc/mc_hash.c diff --git a/src/mc/mc_hash.c b/src/mc/mc_hash.c index 8283392da6..2916ed28ee 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: @@ -197,7 +202,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 +233,16 @@ 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 = 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; @@ -247,31 +252,6 @@ static void mc_hash_stack_frame( } } -/** \brief Find the frame base of a given frame - * - * \param ip Instruction pointer - * \param frame - * \param unw_cursor - */ -void* mc_find_frame_base(unw_word_t ip, dw_frame_t frame, unw_cursor_t* unw_cursor) { - switch(frame->frame_base->type) { - case e_dw_loclist: - { - int loclist_cursor; - for(loclist_cursor=0; loclist_cursor < xbt_dynar_length(frame->frame_base->location.loclist); loclist_cursor++){ - dw_location_entry_t entry = xbt_dynar_get_as(frame->frame_base->location.loclist, loclist_cursor, dw_location_entry_t); - if((ip >= entry->lowpc) && (ip < entry->highpc)){ - return (void*) MC_dwarf_resolve_location(unw_cursor, entry->location, NULL); - } - } - return NULL; - } - // Not handled: - default: - return NULL; - } -} - static void mc_hash_stack(mc_hash_t *hash, mc_snapshot_stack_t stack, mc_hashing_state* state) { unsigned cursor = 0;