Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use LANG=C when calling objdump
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 2 Jan 2014 13:50:52 +0000 (14:50 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 9 Jan 2014 13:14:08 +0000 (14:14 +0100)
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
src/mc/mc_global.c

index c9b6085..e9e6f47 100644 (file)
@@ -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");
 
index b89703a..f1e1c92 100644 (file)
@@ -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");