This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 9 Feb 2015 11:56:01 +0400
- Subject: Re: [PATCH] GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier.
- Authentication-results: sourceware.org; auth=none
- References: <1418164215-27434-1-git-send-email-mjw at redhat dot com> <1421395212 dot 26117 dot 32 dot camel at bordewijk dot wildebeest dot org>
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