diff options
author | Mark Wielaard <mjw@redhat.com> | 2015-02-09 14:58:25 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-02-09 15:09:22 +0100 |
commit | a2c2acaf15e9cc40bae8a6eebba78aadd3a31b8e (patch) | |
tree | d83d74ca8ec983bc4abc4d401d816abb2eb53d48 /gdb/dwarf2read.c | |
parent | e051a5b512a282642030720c69b5b4f9a85314ea (diff) | |
download | gdb-a2c2acaf15e9cc40bae8a6eebba78aadd3a31b8e.zip gdb-a2c2acaf15e9cc40bae8a6eebba78aadd3a31b8e.tar.gz gdb-a2c2acaf15e9cc40bae8a6eebba78aadd3a31b8e.tar.bz2 |
GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier.
gdb/ChangeLog
* c-typeprint.c (cp_type_print_method_args): Handle '_Atomic'.
(c_type_print_modifier): Likewise.
* dwarf2read.c (read_tag_atomic_type): New function.
(read_type_die_1): Handle DW_TAG_atomic_type.
* gdbtypes.c (make_atomic_type): New function.
(recursive_dump_type): Handle TYPE_ATOMIC.
* gdbtypes.h (enum type_flag_values): Renumber.
(enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_ATOMIC.
(TYPE_ATOMIC): New macro.
(make_atomic_type): Declare.
gdb/testsuite/ChangeLog
* gdb.dwarf2/atomic.c: New file.
* gdb.dwarf2/atomic-type.exp: Likewise.
include/ChangeLog
* dwarf2.def: Add DW_TAG_atomic_type.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0d8026f..f7b9b90 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -14344,6 +14344,24 @@ read_tag_restrict_type (struct die_info *die, struct dwarf2_cu *cu) return set_die_type (die, cv_type, cu); } +/* Handle DW_TAG_atomic_type. */ + +static struct type * +read_tag_atomic_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type, *cv_type; + + base_type = die_type (die, cu); + + /* The die_type call above may have already set the type for this DIE. */ + cv_type = get_die_type (die, cu); + if (cv_type) + return cv_type; + + cv_type = make_atomic_type (base_type); + return set_die_type (die, cv_type, cu); +} + /* Extract all information from a DW_TAG_string_type DIE and add to the user defined type vector. It isn't really a user defined type, but it behaves like one, with other DIE's using an AT_user_def_type @@ -18869,6 +18887,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) case DW_TAG_module: this_type = read_module_type (die, cu); break; + case DW_TAG_atomic_type: + this_type = read_tag_atomic_type (die, cu); + break; default: complaint (&symfile_complaints, _("unexpected tag in read_type_die: '%s'"), |