]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw: Add support for DWARF5/GCC5 DW_TAG_atomic_type.
authorMark Wielaard <mjw@redhat.com>
Mon, 9 Feb 2015 15:24:04 +0000 (16:24 +0100)
committerMark Wielaard <mjw@redhat.com>
Mon, 16 Feb 2015 12:24:34 +0000 (13:24 +0100)
GCC5 adds support for the new C11 _Atomic DWARF5 DW_TAG_atomic_type
qualifier. Add it to dwarf.h and handle it in dwarf_peel_type.

http://dwarfstd.org/ShowIssue.php?issue=131112.1

Also documented at https://fedorahosted.org/elfutils/wiki/DwarfExtensions

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdw/ChangeLog
libdw/dwarf.h
libdw/dwarf_peel_type.c
libdw/libdw.h

index dd73c908d33cdcdba128ecdc831ebfcf6a6e4928..ce4ef8942d18252f7050d9cb5e79877419213e92 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-09  Mark Wielaard  <mjw@redhat.com>
+
+       * dwarf.h: Add DW_TAG_atomic_type.
+       * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
+       * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
+
 2015-02-11  Josh Stone  <jistone@redhat.com>
 
        * encoded-value.h (read_encoded_value): Initialize value.
index da8cf3a6b6e4e559a2e78bb6c00109ac8f0cea2b..a97a2c344f017964c72f3570ed12071d66a07a16 100644 (file)
@@ -94,6 +94,9 @@ enum
     DW_TAG_rvalue_reference_type = 0x42,
     DW_TAG_template_alias = 0x43,
 
+    /* DWARF 5.  */
+    DW_TAG_atomic_type = 0x47,
+
     DW_TAG_lo_user = 0x4080,
 
     DW_TAG_MIPS_loop = 0x4081,
index a110bc543eea5bc1539f1ceb4cce50cded326a81..9be838dd9cea4cbf4e82fc4533756c1bb99bb1e3 100644 (file)
@@ -51,7 +51,8 @@ dwarf_peel_type (die, result)
   while (tag == DW_TAG_typedef
         || tag == DW_TAG_const_type
         || tag == DW_TAG_volatile_type
-        || tag == DW_TAG_restrict_type)
+        || tag == DW_TAG_restrict_type
+        || tag == DW_TAG_atomic_type)
     {
       Dwarf_Attribute attr_mem;
       Dwarf_Attribute *attr = INTUSE (dwarf_attr_integrate) (die, DW_AT_type,
index b2b228283ab4e51d15da606170ceb1028f78b089..473e1a25804aecbe6f81cd79039d33ba4271b035 100644 (file)
@@ -409,7 +409,8 @@ extern int dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result)
 
    The current DWARF specification defines one type alias tag
    (DW_TAG_typedef) and three qualifier type tags (DW_TAG_const_type,
-   DW_TAG_volatile_type, DW_TAG_restrict_type).  A future version of
+   DW_TAG_volatile_type, DW_TAG_restrict_type).  DWARF5 defines one
+   other qualifier type tag (DW_TAG_atomic_type).  A future version of
    this function might peel other alias or qualifier type tags if a
    future DWARF version or GNU extension defines other type aliases or
    qualifier type tags that don't modify or change the structural