Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The creation of the pimpl needs no simcall
[simgrid.git] / src / mc / DwarfExpression.hpp
index 1bf89d8..b6713b2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 #include <vector>
 
 #include <elfutils/libdw.h>
+#include <libunwind.h>
 
-#include "src/mc/mc_forward.hpp"
 #include "src/mc/AddressSpace.hpp"
+#include "src/mc/mc_dwarf.hpp"
+#include "src/mc/mc_forward.hpp"
 
 /** @file DwarfExpression.hpp
  *
@@ -41,7 +43,8 @@ typedef std::vector<Dwarf_Op> DwarfExpression;
  *  the process memory, etc. All those informations are gathered in
  *  the evaluation context.
  */
-struct ExpressionContext {
+class ExpressionContext {
+public:
   ExpressionContext() :
     cursor(nullptr), frame_base(nullptr), address_space(nullptr),
     object_info(nullptr), process_index(simgrid::mc::ProcessIndexMissing) {}
@@ -55,10 +58,9 @@ struct ExpressionContext {
 };
 
 /** When an error happens in the execution of a DWARF expression */
-class evaluation_error : std::runtime_error {
+class evaluation_error : public std::runtime_error {
 public:
-  evaluation_error(const char* what): std::runtime_error(what) {}
-  ~evaluation_error() noexcept(true);
+  explicit evaluation_error(const char* what) : std::runtime_error(what) {}
 };
 
 /** A stack for evaluating a DWARF expression