Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Make Process::subprograms a std::unordered_map
[simgrid.git] / src / mc / mc_object_info.h
index bb0baad..019e5e7 100644 (file)
@@ -97,6 +97,41 @@ typedef int mc_object_info_flags;
 namespace simgrid {
 namespace mc {
 
 namespace simgrid {
 namespace mc {
 
+class Variable {
+public:
+  Variable();
+
+  Dwarf_Off dwarf_offset; /* Global offset of the field. */
+  int global;
+  std::string name;
+  std::uint64_t type_id;
+  mc_type_t type;
+
+  // Use either of:
+  simgrid::mc::LocationList location_list;
+  void* address;
+
+  size_t start_scope;
+  mc_object_info_t object_info;
+
+};
+
+class Frame {
+public:
+  Frame();
+
+  int tag;
+  std::string name;
+  void *low_pc;
+  void *high_pc;
+  simgrid::mc::LocationList frame_base;
+  std::vector<Variable> variables;
+  unsigned long int id; /* DWARF offset of the subprogram */
+  std::vector<Frame> scopes;
+  Dwarf_Off abstract_origin_id;
+  mc_object_info_t object_info;
+};
+
 class ObjectInformation {
 public:
   ObjectInformation();
 class ObjectInformation {
 public:
   ObjectInformation();
@@ -114,7 +149,7 @@ public:
   char *end_rw; // Read-write segment
   char *start_ro;
   char *end_ro; // read-only segment
   char *end_rw; // Read-write segment
   char *start_ro;
   char *end_ro; // read-only segment
-  xbt_dict_t subprograms; // xbt_dict_t<origin as hexadecimal string, mc_frame_t>
+  std::unordered_map<std::uint64_t, simgrid::mc::Frame> subprograms;
   // TODO, remove the mutable (to remove it we'll have to add a lot of const everywhere)
   mutable std::vector<simgrid::mc::Variable> global_variables;
   std::unordered_map<std::uint64_t, simgrid::mc::Type> types;
   // TODO, remove the mutable (to remove it we'll have to add a lot of const everywhere)
   mutable std::vector<simgrid::mc::Variable> global_variables;
   std::unordered_map<std::uint64_t, simgrid::mc::Type> types;
@@ -143,41 +178,6 @@ public:
 
 };
 
 
 };
 
-class Variable {
-public:
-  Variable();
-
-  Dwarf_Off dwarf_offset; /* Global offset of the field. */
-  int global;
-  std::string name;
-  std::uint64_t type_id;
-  mc_type_t type;
-
-  // Use either of:
-  simgrid::mc::LocationList location_list;
-  void* address;
-
-  size_t start_scope;
-  mc_object_info_t object_info;
-
-};
-
-class Frame {
-public:
-  Frame();
-
-  int tag;
-  std::string name;
-  void *low_pc;
-  void *high_pc;
-  simgrid::mc::LocationList frame_base;
-  std::vector<Variable> variables;
-  unsigned long int id; /* DWARF offset of the subprogram */
-  std::vector<Frame> scopes;
-  Dwarf_Off abstract_origin_id;
-  mc_object_info_t object_info;
-};
-
 }
 }
 
 }
 }