#include <mc/mc.h>
#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;
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);
}