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.
This commit is contained in:
Mark Wielaard 2015-02-09 14:58:25 +01:00
parent e051a5b512
commit a2c2acaf15
10 changed files with 216 additions and 13 deletions

View file

@ -270,6 +270,9 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
if (TYPE_RESTRICT (domain))
fprintf_filtered (stream, " restrict");
if (TYPE_ATOMIC (domain))
fprintf_filtered (stream, " _Atomic");
}
}
@ -431,6 +434,14 @@ c_type_print_modifier (struct type *type, struct ui_file *stream,
did_print_modifier = 1;
}
if (TYPE_ATOMIC (type))
{
if (did_print_modifier || need_pre_space)
fprintf_filtered (stream, " ");
fprintf_filtered (stream, "_Atomic");
did_print_modifier = 1;
}
address_space_id = address_space_int_to_name (get_type_arch (type),
TYPE_INSTANCE_FLAGS (type));
if (address_space_id)