From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26256 invoked by alias); 13 May 2013 15:31:07 -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 26246 invoked by uid 89); 13 May 2013 15:31:07 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 13 May 2013 15:31:06 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4DFV3dx018639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 May 2013 11:31:03 -0400 Received: from barimba (ovpn-113-133.phx2.redhat.com [10.3.113.133]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4DFV1eJ022883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 13 May 2013 11:31:02 -0400 From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] DWARF: Mark all Ada functions as prototyped. References: <1368440218-22309-1-git-send-email-brobecker@adacore.com> Date: Mon, 13 May 2013 15:31:00 -0000 In-Reply-To: <1368440218-22309-1-git-send-email-brobecker@adacore.com> (Joel Brobecker's message of "Mon, 13 May 2013 14:16:58 +0400") Message-ID: <87txm6dhhm.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00442.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> This makes sure that the types of the arguments are taken into account Joel> when performing an inferior function call, and in particular Joel> appropriatly converted to the correct type. DWARF implies that this attribute is only meaningful for C. And GCC emits it only for C89 (though GCC pretends that all variants of C are C89... oops): static inline void add_prototyped_attribute (dw_die_ref die, tree func_type) { if (get_AT_unsigned (comp_unit_die (), DW_AT_language) == DW_LANG_C89 && prototype_p (func_type)) add_AT_flag (die, DW_AT_prototyped, 1); } Joel> - /* All functions in C++, Pascal and Java have prototypes. */ Joel> + /* All functions in Ada, C++, Pascal and Java have prototypes. */ Joel> attr = dwarf2_attr (die, DW_AT_prototyped, cu); Joel> if ((attr && (DW_UNSND (attr) != 0)) Joel> + || cu->language == language_ada Joel> || cu->language == language_cplus Joel> || cu->language == language_java Joel> || cu->language == language_pascal) ... 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? Tom