Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use LANG=C when calling objdump
[simgrid.git] / src / mc / mc_checkpoint.c
index 2b2fe9d..e9e6f47 100644 (file)
@@ -177,7 +177,7 @@ static void MC_get_memory_regions(mc_snapshot_t snapshot){
               }
               tok = strtok(lfields[0], "-");
               start_addr1 = (void *)strtoul(tok, NULL, 16);
-              if(lfields[1][1] == 'w' && lfields[5] == NULL){
+              if(lfields[1][1] == 'w'){
                 if(start_addr1 == std_heap){     /* Std_heap ? */
                   tok = strtok(NULL, "-");
                   end_addr = (void *)strtoul(tok, NULL, 16);
@@ -206,6 +206,7 @@ static void MC_get_memory_regions(mc_snapshot_t snapshot){
 
 }
 
+/** @brief Find the range of the different memory segments and binary paths */
 void MC_init_memory_map_info(){
  
   unsigned int i = 0;
@@ -264,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");
 
@@ -329,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");