Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / mc / mc_compare.cpp
index ed0d50e..ca498ee 100644 (file)
 #include <xbt/sysdep.h>
 
 #include "src/internal_config.h"
-#include "mc_object_info.h"
-#include "mc_safety.h"
-#include "mc_liveness.h"
-#include "mc_private.h"
-#include "mc_smx.h"
-#include "mc_dwarf.hpp"
+#include "src/mc/mc_safety.h"
+#include "src/mc/mc_liveness.h"
+#include "src/mc/mc_private.h"
+#include "src/mc/mc_smx.h"
+#include "src/mc/mc_dwarf.hpp"
 
 #include "src/mc/Frame.hpp"
 #include "src/mc/ObjectInformation.hpp"
@@ -321,7 +320,7 @@ static int compare_local_variables(int process_index,
       current_var1 = &stack1->local_variables[cursor];
       current_var2 = &stack1->local_variables[cursor];
       if (current_var1->name != current_var2->name
-          || current_var1->subprogram != current_var1->subprogram
+          || current_var1->subprogram != current_var2->subprogram
           || current_var1->ip != current_var2->ip) {
         // TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
         XBT_VERB
@@ -440,11 +439,11 @@ int snapshot_compare(void *state1, void *state2)
   xbt_mheap_t heap1 = (xbt_mheap_t)s1->read_bytes(
     alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
     remote(process->heap_address),
-    simgrid::mc::ProcessIndexMissing, simgrid::mc::AddressSpace::Lazy);
+    simgrid::mc::ProcessIndexMissing, simgrid::mc::ReadOptions::lazy());
   xbt_mheap_t heap2 = (xbt_mheap_t)s2->read_bytes(
     alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
     remote(process->heap_address),
-    simgrid::mc::ProcessIndexMissing, simgrid::mc::AddressSpace::Lazy);
+    simgrid::mc::ProcessIndexMissing, simgrid::mc::ReadOptions::lazy());
   res_init = init_heap_information(heap1, heap2, &s1->to_ignore, &s2->to_ignore);
   if (res_init == -1) {
 #ifdef MC_DEBUG
@@ -469,7 +468,7 @@ int snapshot_compare(void *state1, void *state2)
   mc_snapshot_stack_t stack1, stack2;
   while (cursor < s1->stacks.size()) {
     stack1 = &s1->stacks[cursor];
-    stack2 = &s1->stacks[cursor];
+    stack2 = &s2->stacks[cursor];
 
     if (stack1->process_index != stack2->process_index) {
       diff_local = 1;
@@ -520,7 +519,8 @@ int snapshot_compare(void *state1, void *state2)
 
     /* Compare global variables */
     is_diff =
-      compare_global_variables(region1->object_info(  ), simgrid::mc::AddressSpace::Normal,
+      compare_global_variables(region1->object_info(),
+        simgrid::mc::ProcessIndexDisabled,
         region1, region2,
         s1, s2);