X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/df8c71f457b614d62d673ff5df36a764fbf15414..3203ed1f4fb6f4617e94d5351661ba07e8b8f833:/teshsuite/mc/dwarf/dwarf.cpp diff --git a/teshsuite/mc/dwarf/dwarf.cpp b/teshsuite/mc/dwarf/dwarf.cpp index 91693d3853..91df00c073 100644 --- a/teshsuite/mc/dwarf/dwarf.cpp +++ b/teshsuite/mc/dwarf/dwarf.cpp @@ -15,13 +15,13 @@ #include #include "mc/datatypes.h" -#include "mc/mc_object_info.h" -#include "mc/mc_private.h" +#include "src/mc/mc_object_info.h" +#include "src/mc/mc_private.h" -#include "mc/Process.hpp" -#include "mc/Type.hpp" -#include "mc/ObjectInformation.hpp" -#include "mc/Variable.hpp" +#include "src/mc/Process.hpp" +#include "src/mc/Type.hpp" +#include "src/mc/ObjectInformation.hpp" +#include "src/mc/Variable.hpp" int test_some_array[4][5][6]; struct some_struct { int first; int second[4][5]; } test_some_struct; @@ -68,16 +68,14 @@ static void test_local_variable(simgrid::mc::ObjectInformation* info, const char simgrid::mc::Variable* var = find_local_variable(subprogram, variable); assert(var); - void* frame_base = mc_find_frame_base(subprogram, info, cursor); - s_mc_location_t location; + void* frame_base = subprogram->frame_base(*cursor); + simgrid::dwarf::Location location = simgrid::dwarf::resolve( + var->location_list, info, cursor, frame_base, NULL, -1); - mc_dwarf_resolve_locations(&location, - &var->location_list, info, cursor, frame_base, NULL, -1); - - xbt_assert(mc_get_location_type(&location)==MC_LOCATION_TYPE_ADDRESS, - "Unexpected location type for variable %s of %s", variable, function); - - xbt_assert(location.memory_location == address, + xbt_assert(location.in_memory(), + "Expected the variable %s of function %s to be in memory", + variable, function); + xbt_assert(location.address() == address, "Bad resolution of local variable %s of %s", variable, function); }