[PATCH] GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier.
Joel Brobecker
brobecker@adacore.com
Mon Feb 9 07:56:00 GMT 2015
Sorry about the delay in reviewing this.
> > This is a cleanup version of the prototype we discussed 6 months ago.
> > https://sourceware.org/ml/gdb-patches/2014-06/msg00795.html
> > GCC now has support for DW_TAG_atomic_type when using the experimental
> > -gdwarf-5 flag. I fixed up the issues Tom pointed out back in June.
> > And I changed the testcase to use the DWARF assembler.
> > 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.
The part in include is controlled by GCC. As soon as approved there,
it is OK to propagate the change to binutils-gdb.git as well (just
shooting us an email, as if applying an "obvious" patch).
Note that I went to the DWARF website, and verified that this new
tag has been accepted with 0x47 as its value (as proposed here).
Looks good to me, with a couple of slight nits (our faults, I'm afraid,
but fortunately trivially fixed).
> +++ b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
> @@ -0,0 +1,90 @@
> +# Copyright 2014 Free Software Foundation, Inc.
Need to add 2015 to the list (that is: "2014-2015").
> +set asm_file [standard_output_file $srcfile2]
> +#set ptr_size [get_sizeof "void *" 96]
Delete this commented out statement.
> +/* This testcase is part of GDB, the GNU debugger.
> +
> + Copyright 2004-2014 Free Software Foundation, Inc.
s/2014/2015/.
> +int
> +main()
While at it, would you mind reformatting this as:
main (void)
? There was a decision not too long ago that we'd try to have
the code in our testsuite try to conform to the GCS unless there
was reason not to.
Thank you,
--
Joel
More information about the Gdb-patches
mailing list