Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mornign cleanups
[simgrid.git] / src / mc / inspect / mc_dwarf.cpp
index 93fc9c7..74b9f47 100644 (file)
@@ -123,7 +123,6 @@ enum class FormClass {
 static TagClass classify_tag(int tag)
 {
   switch (tag) {
-
     case DW_TAG_array_type:
     case DW_TAG_class_type:
     case DW_TAG_enumeration_type:
@@ -224,7 +223,7 @@ static FormClass classify_form(int form)
  */
 inline XBT_PRIVATE const char* tagname(Dwarf_Die* die)
 {
-  return simgrid::dwarf::tagname(dwarf_tag(die));
+  return tagname(dwarf_tag(die));
 }
 
 } // namespace dwarf
@@ -494,7 +493,6 @@ static void MC_dwarf_add_members(simgrid::mc::ObjectInformation* /*info*/, Dwarf
   for (res = dwarf_child(die, &child); res == 0; res = dwarf_siblingof(&child, &child)) {
     int tag = dwarf_tag(&child);
     if (tag == DW_TAG_member || tag == DW_TAG_inheritance) {
-
       // Skip declarations:
       if (MC_dwarf_attr_flag(&child, DW_AT_declaration, false))
         continue;
@@ -802,8 +800,7 @@ static void MC_dwarf_handle_scope_die(simgrid::mc::ObjectInformation* info, Dwar
     Dwarf_Addr high_pc;
 
     switch (simgrid::dwarf::classify_form(dwarf_whatform(&attr))) {
-
-        // DW_AT_high_pc if an offset from the low_pc:
+      // DW_AT_high_pc if an offset from the low_pc:
       case simgrid::dwarf::FormClass::Constant:
 
         xbt_assert(dwarf_formsdata(&attr, &offset) == 0, "Could not read constant");
@@ -867,8 +864,7 @@ static void MC_dwarf_handle_die(simgrid::mc::ObjectInformation* info, Dwarf_Die*
   int tag                        = dwarf_tag(die);
   simgrid::dwarf::TagClass klass = simgrid::dwarf::classify_tag(tag);
   switch (klass) {
-
-      // Type:
+    // Type:
     case simgrid::dwarf::TagClass::Type:
       MC_dwarf_handle_type_die(info, die, unit, frame, ns);
       break;
@@ -1139,7 +1135,6 @@ static void MC_post_process_variables(simgrid::mc::ObjectInformation* info)
 
 static void mc_post_process_scope(simgrid::mc::ObjectInformation* info, simgrid::mc::Frame* scope)
 {
-
   if (scope->tag == DW_TAG_inlined_subroutine) {
     // Attach correct namespaced name in inlined subroutine:
     auto i = info->subprograms.find(scope->abstract_origin_id);
@@ -1196,11 +1191,10 @@ namespace simgrid {
 namespace mc {
 
 /** @brief Finds informations about a given shared object/executable */
-std::shared_ptr<simgrid::mc::ObjectInformation> createObjectInformation(std::vector<simgrid::xbt::VmMap> const& maps,
-                                                                        const char* name)
+std::shared_ptr<ObjectInformation> createObjectInformation(std::vector<xbt::VmMap> const& maps, const char* name)
 {
-  std::shared_ptr<simgrid::mc::ObjectInformation> result = std::make_shared<simgrid::mc::ObjectInformation>();
-  result->file_name                                      = name;
+  std::shared_ptr<ObjectInformation> result = std::make_shared<ObjectInformation>();
+  result->file_name                         = name;
   simgrid::mc::find_object_address(maps, result.get());
   MC_load_dwarf(result.get());
   MC_post_process_variables(result.get());
@@ -1213,12 +1207,11 @@ std::shared_ptr<simgrid::mc::ObjectInformation> createObjectInformation(std::vec
 
 /*************************************************************************/
 
-void postProcessObjectInformation(simgrid::mc::RemoteClient* process, simgrid::mc::ObjectInformation* info)
+void postProcessObjectInformation(RemoteClient* process, ObjectInformation* info)
 {
   for (auto& t : info->types) {
-
-    simgrid::mc::Type* type    = &(t.second);
-    simgrid::mc::Type* subtype = type;
+    Type* type    = &(t.second);
+    Type* subtype = type;
     while (subtype->type == DW_TAG_typedef || subtype->type == DW_TAG_volatile_type ||
            subtype->type == DW_TAG_const_type)
       if (subtype->subtype)