From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10752 invoked by alias); 15 May 2013 13:19:55 -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 10738 invoked by uid 89); 15 May 2013 13:19:54 -0000 X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 15 May 2013 13:19:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B049D2E668; Wed, 15 May 2013 09:19:52 -0400 (EDT) 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 oLaNp6Sw-B6q; Wed, 15 May 2013 09:19:52 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4AAC12E0D6; Wed, 15 May 2013 09:19:52 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4E54AC26E7; Wed, 15 May 2013 17:19:46 +0400 (RET) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: Re: [RFA/commit] DWARF: Mark all Ada functions as prototyped. Date: Wed, 15 May 2013 13:19:00 -0000 Message-Id: <1368623983-10625-1-git-send-email-brobecker@adacore.com> In-Reply-To: <87txm6dhhm.fsf@fleche.redhat.com> References: <87txm6dhhm.fsf@fleche.redhat.com> X-SW-Source: 2013-05/txt/msg00523.txt.bz2 Hi Tom, > DWARF implies that this attribute is only meaningful for C. And GCC > emits it only for C89 [...] Indeed, upon double-checking the DWARF standard, it does seem so. > ... so I suggest instead inverting the sense here and rewriting it to > check just for languages that are "C-like" -- DW_LANG_C89, DW_LANG_C, > DW_LANG_ObjC, DW_LANG_C99, and DW_LANG_UPC. > > What do you think? I hesitated a bit before doing so, because I think that the concept of prototyped-or-not might be language-dependent. But, in the end, I think that language other than C are rarely going to be in the same category as C (or so I hope!), and we can always adjust the logic accordingly anyway. I don't know if we have access to the CU's DW_AT_language attribute at this point anymore, but it seems simpler to test for language_c in any case. There is still the question of language_minimal, auto, etc, and even maybe asm. For now, I just put them in the same bag as non-C languages, but it's easy to adjust the patch. I reviewed the list of languages from the DWARF 4 standard, and noticed that we did not set the language for DW_LANG_UPC, so I added that as a first patch. Hence this RFA now becomes a two-patches RFA: [dwarf]: Add DW_LANG_UPC support in set_cu_language. [dwarf] Mark all functions as prototyped except C Let me know what you think... Thanks, -- Joel