From: Gabriel Corona Date: Tue, 24 Dec 2013 13:25:34 +0000 (+0100) Subject: [mc] Include ELF file name in object_info_t X-Git-Tag: v3_11~199^2~2^2~35^2~27 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f5a0234ae3d4adeb86ed57763ff23aba502a186f [mc] Include ELF file name in object_info_t --- diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 3f97546691..457776c8a2 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -176,6 +176,7 @@ static void dw_variable_free_voidp(void *t){ mc_object_info_t MC_new_object_info() { mc_object_info_t res = xbt_new(s_mc_object_info_t, 1); + res->file_name = NULL; res->local_variables = xbt_dict_new_homogeneous(NULL); res->global_variables = xbt_dynar_new(sizeof(dw_variable_t), dw_variable_free_voidp); res->types = xbt_dict_new_homogeneous(NULL); @@ -183,6 +184,7 @@ mc_object_info_t MC_new_object_info() { } void MC_free_object_info(mc_object_info_t* info) { + xbt_free(&(*info)->file_name); xbt_dict_free(&(*info)->local_variables); xbt_dynar_free(&(*info)->global_variables); xbt_dict_free(&(*info)->types); @@ -528,6 +530,8 @@ static mc_object_info_t MC_dwarf_get_variables(const char *elf_file){ perror("popen for objdump failed"); mc_object_info_t result = MC_new_object_info(); + result->file_name = xbt_strdup(elf_file); + xbt_dict_t *local_variables = &result->local_variables; xbt_dynar_t *global_variables = &result->global_variables; xbt_dict_t *types = &result->types; diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index c9bd28ec98..d381612c9e 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -334,6 +334,7 @@ void MC_dump_stack_liveness(xbt_fifo_t stack); /********************************** Variables with DWARF **********************************/ typedef struct s_mc_object_info { + char* file_name; xbt_dict_t local_variables; xbt_dynar_t global_variables; xbt_dict_t types;