X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/98a167fa2243c248259017276314ff93c8e841fe..2b99a23b58af6f52e1828cefeb8c6a3610b85279:/src/mc/mc_compare.cpp diff --git a/src/mc/mc_compare.cpp b/src/mc/mc_compare.cpp index ed0d50e18d..4c1e7df035 100644 --- a/src/mc/mc_compare.cpp +++ b/src/mc/mc_compare.cpp @@ -13,12 +13,11 @@ #include #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" @@ -157,9 +156,9 @@ static int compare_areas_with_type(ComparisonState& state, return (addr_pointed1 != addr_pointed2); } else { - if (addr_pointed1 == NULL && addr_pointed2 == NULL) + if (addr_pointed1 == nullptr && addr_pointed2 == NULL) return 0; - if (addr_pointed1 == NULL || addr_pointed2 == NULL) + if (addr_pointed1 == nullptr || addr_pointed2 == NULL) return 1; if (!state.compared_pointers.insert( std::make_pair(addr_pointed1, addr_pointed2)).second) @@ -180,7 +179,7 @@ static int compare_areas_with_type(ComparisonState& state, return 1; // The pointers are both in the heap: return compare_heap_area(process_index, addr_pointed1, addr_pointed2, snapshot1, - snapshot2, NULL, type->subtype, pointer_level); + snapshot2, nullptr, type->subtype, pointer_level); } // The pointers are both in the current object R/W segment: @@ -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);