diff options
author | Mark Wielaard <mjw@redhat.com> | 2015-02-09 16:24:04 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-02-16 13:24:34 +0100 |
commit | 7fb8031aed51ee7c5eb5e5e9c0e072a1367ff7cb (patch) | |
tree | d08cd02bdad538da38b6f25bffec7700bcb907d1 /libdw | |
parent | 3d11410c481ead29ac52974d05073057d5ca5264 (diff) | |
download | elfutils-7fb8031aed51ee7c5eb5e5e9c0e072a1367ff7cb.tar.gz |
libdw: Add support for DWARF5/GCC5 DW_TAG_atomic_type.
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>
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 6 | ||||
-rw-r--r-- | libdw/dwarf.h | 3 | ||||
-rw-r--r-- | libdw/dwarf_peel_type.c | 3 | ||||
-rw-r--r-- | libdw/libdw.h | 3 |
4 files changed, 13 insertions, 2 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index dd73c908..ce4ef894 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -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. diff --git a/libdw/dwarf.h b/libdw/dwarf.h index da8cf3a6..a97a2c34 100644 --- a/libdw/dwarf.h +++ b/libdw/dwarf.h @@ -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, diff --git a/libdw/dwarf_peel_type.c b/libdw/dwarf_peel_type.c index a110bc54..9be838dd 100644 --- a/libdw/dwarf_peel_type.c +++ b/libdw/dwarf_peel_type.c @@ -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, diff --git a/libdw/libdw.h b/libdw/libdw.h index b2b22828..473e1a25 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -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 |