]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
m_debuginfo: Handle DW_TAG_atomic_type
authorMark Wielaard <mark@klomp.org>
Sat, 18 Sep 2021 00:19:13 +0000 (02:19 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 18 Sep 2021 20:25:48 +0000 (22:25 +0200)
DW_TAG_atomic_type is a DWARF5 qualifier tag like DW_TAG_volatile_type,
DW_TAG_const_type and DW_TAG_restrict_type.

coregrind/m_debuginfo/readdwarf3.c
coregrind/m_debuginfo/tytypes.c

index 52c27d4bb4ede51f1666ecf442d95a48919cc243..968c37bd637fa2005e70b84c0be8eb72e4a0a7c3 100644 (file)
@@ -4191,14 +4191,15 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
    }
 
    if (dtag == DW_TAG_volatile_type || dtag == DW_TAG_const_type
-       || dtag == DW_TAG_restrict_type) {
+       || dtag == DW_TAG_restrict_type || dtag == DW_TAG_atomic_type) {
       Int have_ty = 0;
       VG_(memset)(&typeE, 0, sizeof(typeE));
       typeE.cuOff = D3_INVALID_CUOFF;
       typeE.tag   = Te_TyQual;
       typeE.Te.TyQual.qual
          = (dtag == DW_TAG_volatile_type ? 'V'
-            : (dtag == DW_TAG_const_type ? 'C' : 'R'));
+            : (dtag == DW_TAG_const_type ? 'C'
+               : (dtag == DW_TAG_restrict_type ? 'R' : 'A')));
       /* target type defaults to 'void' */
       typeE.Te.TyQual.typeR = D3_FAKEVOID_CUOFF;
       nf_i = 0;
index 75e4cf500b2cfc41f159d423a7ec3fbc6860d50e..e356b92c9a2eba66dec476140fae7ad06dda4783 100644 (file)
@@ -295,6 +295,7 @@ void ML_(pp_TyEnt_C_ishly)( const XArray* /* of TyEnt */ tyents,
             case 'C': VG_(printf)("const "); break;
             case 'V': VG_(printf)("volatile "); break;
             case 'R': VG_(printf)("restrict "); break;
+            case 'A': VG_(printf)("atomic "); break;
             default: goto unhandled;
          }
          ML_(pp_TyEnt_C_ishly)(tyents, ent->Te.TyQual.typeR);