From eb1156b4aba074a49e462f2872456250df7ce28a Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 16 Jan 2014 15:57:52 +0100 Subject: [PATCH] [mc] Cleanup mc_dwarf.c --- src/mc/mc_dwarf.c | 9 ++++----- src/mc/mc_private.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mc/mc_dwarf.c b/src/mc/mc_dwarf.c index ccf89dea23..a46409445c 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); @@ -816,7 +815,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: diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index 488a68a66c..4e14c26921 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -332,7 +332,6 @@ mc_object_info_t MC_new_object_info(void); mc_object_info_t MC_find_object_info(memory_map_t maps, char* name); void MC_free_object_info(mc_object_info_t* p); -xbt_dict_t MC_dwarf_get_location_list(const char *elf_file); void MC_dwarf_get_variables(mc_object_info_t info); void MC_dwarf_get_variables_libdw(mc_object_info_t info); const char* MC_dwarf_attrname(int attr); -- 2.20.1