Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the amount of implicit include directories
[simgrid.git] / src / mc / DwarfExpression.cpp
index ddb3799..3f88a7d 100644 (file)
 
 #include "mc_object_info.h"
 #include "mc_private.h"
-#include "mc/LocationList.hpp"
-#include "mc/AddressSpace.hpp"
-#include "mc/Frame.hpp"
-#include "mc/ObjectInformation.hpp"
-#include "mc/DwarfExpression.hpp"
+#include "src/mc/LocationList.hpp"
+#include "src/mc/AddressSpace.hpp"
+#include "src/mc/Frame.hpp"
+#include "src/mc/ObjectInformation.hpp"
+#include "src/mc/DwarfExpression.hpp"
 #include "mc_dwarf.hpp"
 
 using simgrid::mc::remote;
@@ -24,13 +24,7 @@ using simgrid::mc::remote;
 namespace simgrid {
 namespace dwarf {
 
-evaluation_error::~evaluation_error() {}
-
-}
-}
-
-namespace simgrid {
-namespace dwarf {
+evaluation_error::~evaluation_error() noexcept(true) {}
 
 void execute(
   const Dwarf_Op* ops, std::size_t n,
@@ -267,39 +261,3 @@ void execute(
 
 }
 }
-
-extern "C" {
-
-void mc_dwarf_location_list_init(
-  simgrid::dwarf::LocationList* list, simgrid::mc::ObjectInformation* info,
-  Dwarf_Die * die, Dwarf_Attribute * attr)
-{
-  list->clear();
-
-  std::ptrdiff_t offset = 0;
-  Dwarf_Addr base, start, end;
-  Dwarf_Op *ops;
-  std::size_t len;
-
-  while (1) {
-
-    offset = dwarf_getlocations(attr, offset, &base, &start, &end, &ops, &len);
-    if (offset == 0)
-      return;
-    else if (offset == -1)
-      xbt_die("Error while loading location list");
-
-    simgrid::dwarf::LocationListEntry entry;
-    entry.expression = simgrid::dwarf::DwarfExpression(ops, ops + len);
-
-    void *base = info->base_address();
-    // If start == 0, this is not a location list:
-    entry.lowpc = start == 0 ? NULL : (char *) base + start;
-    entry.highpc = start == 0 ? NULL : (char *) base + end;
-
-    list->push_back(std::move(entry));
-  }
-
-}
-
-}