From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28988 invoked by alias); 9 Feb 2015 07:56:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28979 invoked by uid 89); 9 Feb 2015 07:56:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 09 Feb 2015 07:56:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7C6A5116569; Mon, 9 Feb 2015 02:56:05 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GVs5ELsZMqXO; Mon, 9 Feb 2015 02:56:05 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1320C116410; Mon, 9 Feb 2015 02:56:05 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 5C46D40EAF; Mon, 9 Feb 2015 11:56:01 +0400 (RET) Date: Mon, 09 Feb 2015 07:56:00 -0000 From: Joel Brobecker To: Mark Wielaard Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier. Message-ID: <20150209075601.GG4738@adacore.com> References: <1418164215-27434-1-git-send-email-mjw@redhat.com> <1421395212.26117.32.camel@bordewijk.wildebeest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1421395212.26117.32.camel@bordewijk.wildebeest.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-02/txt/msg00190.txt.bz2 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