Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
code simplification around simgrid::surf::NetCardImpl
[simgrid.git] / src / mc / mc_dwarf.cpp
index 4b88e2f..3886239 100644 (file)
 #include <elfutils/libdw.h>
 
 #include <simgrid_config.h>
-#include <simgrid/util.hpp>
+#include "src/simgrid/util.hpp"
 #include <xbt/log.h>
 #include <xbt/sysdep.h>
 
-#include <simgrid/util.hpp>
+#include "src/mc/mc_object_info.h"
+#include "src/mc/mc_private.h"
+#include "src/mc/mc_dwarf.hpp"
 
-#include "mc_object_info.h"
-#include "mc_private.h"
-#include "mc_dwarf.hpp"
-
-#include "mc/Process.hpp"
-#include "mc/ObjectInformation.hpp"
-#include "mc/Variable.hpp"
+#include "src/mc/Process.hpp"
+#include "src/mc/ObjectInformation.hpp"
+#include "src/mc/Variable.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_dwarf, mc, "DWARF processing");
 
@@ -134,7 +132,7 @@ enum class FormClass {
   RangeListPtr
 };
 
-XBT_PRIVATE
+static
 TagClass classify_tag(int tag)
 {
   switch (tag) {
@@ -193,7 +191,7 @@ TagClass classify_tag(int tag)
  *  \param form The form (values taken from the DWARF spec)
  *  \return An internal representation for the corresponding class
  * */
-XBT_PRIVATE
+static
 FormClass classify_form(int form)
 {
   switch (form) {
@@ -764,9 +762,8 @@ static std::unique_ptr<simgrid::mc::Variable> MC_die_to_variable(
   case simgrid::dwarf::FormClass::LocListPtr:
   case simgrid::dwarf::FormClass::Constant:
     // Reference to location list:
-    mc_dwarf_location_list_init(
-      &variable->location_list, info, die,
-      &attr_location);
+    variable->location_list = simgrid::dwarf::location_list(
+      *info, attr_location);
     break;
 
   default:
@@ -909,8 +906,8 @@ static void MC_dwarf_handle_scope_die(simgrid::mc::ObjectInformation* info, Dwar
   if (klass == simgrid::dwarf::TagClass::Subprogram) {
     Dwarf_Attribute attr_frame_base;
     if (dwarf_attr_integrate(die, DW_AT_frame_base, &attr_frame_base))
-      mc_dwarf_location_list_init(&frame.frame_base_location, info, die,
-                                  &attr_frame_base);
+      frame.frame_base_location = simgrid::dwarf::location_list(*info,
+                                  attr_frame_base);
   }
 
   // Handle children:
@@ -1152,7 +1149,7 @@ static void MC_post_process_types(simgrid::mc::ObjectInformation* info)
 
 /** \brief Finds informations about a given shared object/executable */
 std::shared_ptr<simgrid::mc::ObjectInformation> MC_find_object_info(
-  std::vector<simgrid::mc::VmMap> const& maps, const char *name)
+  std::vector<simgrid::xbt::VmMap> const& maps, const char *name)
 {
   std::shared_ptr<simgrid::mc::ObjectInformation> result =
     std::make_shared<simgrid::mc::ObjectInformation>();
@@ -1273,4 +1270,4 @@ int dwarf_register_to_libunwind(int dwarf_register)
 }
 
 }
-}
\ No newline at end of file
+}