From fd81026ba83075bf0b874d39156eef7de2ced0b2 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 2 Jan 2014 14:50:52 +0100 Subject: [PATCH] [mc] Use LANG=C when calling objdump The output of objdump change with the locale and the parser fails with some locales. Conflicts: src/mc/mc_checkpoint.c --- src/mc/mc_checkpoint.c | 4 ++-- src/mc/mc_global.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index c9b6085e08..e9e6f479e0 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -265,7 +265,7 @@ void MC_get_libsimgrid_plt_section(){ int i, plt_found = 0; unsigned long int size, offset; - char *command = bprintf("objdump --section-headers %s", libsimgrid_path); + char *command = bprintf("LANG=C objdump --section-headers %s", libsimgrid_path); fp = popen(command, "r"); @@ -330,7 +330,7 @@ void MC_get_binary_plt_section(){ int i, plt_found = 0; unsigned long int size; - char *command = bprintf( "objdump --section-headers %s", xbt_binary_name); + char *command = bprintf("LANG=C objdump --section-headers %s", xbt_binary_name); fp = popen(command, "r"); diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index b89703a99f..f1e1c922b9 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -321,7 +321,7 @@ static dw_location_t MC_dwarf_get_location(xbt_dict_t location_list, char *expr) */ static xbt_dict_t MC_dwarf_get_location_list(const char *elf_file){ - char *command = bprintf("objdump -Wo %s", elf_file); + char *command = bprintf("LANG=C objdump -Wo %s", elf_file); FILE *fp = popen(command, "r"); @@ -505,7 +505,7 @@ static int MC_dwarf_get_variable_index(xbt_dynar_t variables, char* var, void *a static void MC_dwarf_get_variables(const char *elf_file, xbt_dict_t location_list, xbt_dict_t *local_variables, xbt_dynar_t *global_variables, xbt_dict_t *types){ - char *command = bprintf("objdump -Wi %s", elf_file); + char *command = bprintf("LANG=C objdump -Wi %s", elf_file); FILE *fp = popen(command, "r"); -- 2.20.1