Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Handle reference_type and rvalue_reference_type as pointer_type (C++)
[simgrid.git] / src / mc / mc_dwarf.c
index 696f1d0..c4c00ba 100644 (file)
@@ -136,6 +136,8 @@ static mc_tag_class MC_dwarf_tag_classify(int tag) {
     case DW_TAG_enumeration_type:
     case DW_TAG_typedef:
     case DW_TAG_pointer_type:
+    case DW_TAG_reference_type:
+    case DW_TAG_rvalue_reference_type:
     case DW_TAG_string_type:
     case DW_TAG_structure_type:
     case DW_TAG_subroutine_type:
@@ -623,6 +625,10 @@ static void MC_dwarf_add_members(mc_object_info_t info, Dwarf_Die* die, Dwarf_Di
   for (res=dwarf_child(die, &child); res==0; res=dwarf_siblingof(&child,&child)) {
     if (dwarf_tag(&child)==DW_TAG_member) {
 
+      // Skip declarations:
+      if (MC_dwarf_attr_flag(&child, DW_AT_declaration, false))
+        continue;
+
       // Skip compile time constants:
       if(dwarf_hasattr(&child, DW_AT_const_value))
         continue;