Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the amount of implicit include directories
[simgrid.git] / teshsuite / mc / dwarf / dwarf.cpp
index 91693d3..91df00c 100644 (file)
 #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;
@@ -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);
 
 }