X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/259846cec30ce7d04d1e79a0c240a4e24f889436..bae5752be0e480623ea0f18bc68b117a9e5c5059:/src/mc/mc_dwarf.c diff --git a/src/mc/mc_dwarf.c b/src/mc/mc_dwarf.c index ccf89dea23..a6124c9ba2 100644 --- a/src/mc/mc_dwarf.c +++ b/src/mc/mc_dwarf.c @@ -165,8 +165,7 @@ static const char* MC_dwarf_at_linkage_name(Dwarf_Die* die) { * \return MC specific representation of the location list represented by the given attribute * of the given die */ -static dw_location_t MC_dwarf_get_location_list_libdw(Dwarf_Die* die, Dwarf_Attribute* attr) { - +static dw_location_t MC_dwarf_get_location_list(Dwarf_Die* die, Dwarf_Attribute* attr) { dw_location_t location = xbt_new0(s_dw_location_t, 1); location->type = e_dw_loclist; @@ -229,7 +228,7 @@ static dw_location_t MC_dwarf_get_location(Dwarf_Die* die, Dwarf_Attribute* attr case DW_FORM_data4: case DW_FORM_data8: { - return MC_dwarf_get_location_list_libdw(die, attr); + return MC_dwarf_get_location_list(die, attr); } break; @@ -252,7 +251,7 @@ static dw_location_t MC_dwarf_get_location(Dwarf_Die* die, Dwarf_Attribute* attr * \return MC specific representation of the location represented by the given attribute * of the given die */ -static dw_location_t MC_dwarf_at_location(Dwarf_Die* die, int attribute, mc_object_info_t info) { +static dw_location_t MC_dwarf_at_location(Dwarf_Die* die, int attribute) { if(!dwarf_hasattr_integrate(die, attribute)) return xbt_new0(s_dw_location_t, 1); @@ -784,8 +783,10 @@ static dw_variable_t MC_die_to_variable(mc_object_info_t info, Dwarf_Die* die, D break; } case DW_FORM_sec_offset: // type loclistptr + case DW_FORM_data2: case DW_FORM_data4: - xbt_die("Do not handle loclist locations yet"); + case DW_FORM_data8: + variable->address.location = MC_dwarf_get_location_list(die, &attr_location); break; default: xbt_die("Unexpected form %i list for location in <%p>%s", @@ -816,7 +817,7 @@ static void MC_dwarf_handle_subprogram_die(mc_object_info_t info, Dwarf_Die* die frame->variables = xbt_dynar_new(sizeof(dw_variable_t), dw_variable_free_voidp); frame->high_pc = (void*) MC_dwarf_attr_addr(die, DW_AT_high_pc); frame->low_pc = (void*) MC_dwarf_attr_addr(die, DW_AT_low_pc); - frame->frame_base = MC_dwarf_at_location(die, DW_AT_frame_base, info); + frame->frame_base = MC_dwarf_at_location(die, DW_AT_frame_base); frame->end = -1; // This one is now useless: // Handle children: @@ -867,6 +868,7 @@ static void MC_dwarf_handle_die(mc_object_info_t info, Dwarf_Die* die, Dwarf_Die return; // case DW_TAG_formal_parameter: case DW_TAG_variable: + case DW_TAG_formal_parameter: MC_dwarf_handle_variable_die(info, die, unit, frame); break; }