Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] OOPify/C++ify Type (cont)
[simgrid.git] / src / mc / mc_location.h
index d6f6fe4..1bafe6c 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <stdint.h>
 
+#include <vector>
+
 #include <libunwind.h>
 #include <dwarf.h>
 #include <elfutils/libdw.h>
 #include "mc_forward.h"
 #include "AddressSpace.hpp"
 
+namespace simgrid {
+namespace mc {
+
+typedef std::vector<Dwarf_Op> DwarfExpression;
+
+}
+}
+
 SG_BEGIN_DECL()
 
 /** \brief a DWARF expression with optional validity contraints */
@@ -115,4 +125,17 @@ MC_SHOULD_BE_INTERNAL void* mc_find_frame_base(
 
 SG_END_DECL()
 
+namespace simgrid {
+namespace mc {
+
+inline
+int execute(DwarfExpression const& expression, mc_expression_state_t state)
+{
+  return mc_dwarf_execute_expression(
+    expression.size(), expression.data(), state);
+}
+
+}
+}
+
 #endif