From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99162 invoked by alias); 16 Jul 2015 08:34:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 99148 invoked by uid 89); 16 Jul 2015 08:34:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 16 Jul 2015 08:34:07 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id EB68C28B2065; Thu, 16 Jul 2015 10:34:03 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O5jvTQ5LcdO9; Thu, 16 Jul 2015 10:34:03 +0200 (CEST) Received: from [10.10.1.112] (cacatoes.act-europe.fr [10.10.1.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id D6F0B28B1F69; Thu, 16 Jul 2015 10:34:03 +0200 (CEST) From: Pierre-Marie de Rodat Subject: [PATCHES] Enhance standard DWARF for Ada To: GCC Patches Message-ID: <55A76C7B.7080303@adacore.com> Date: Thu, 16 Jul 2015 08:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg01355.txt.bz2 Hello, This patch series aims at enhancing GCC to emit standard DWARF in place of the current GNAT encodings (non-standard DWARF) for a set of "basic" types: dynamic arrays, variable-length records, variant parts, etc. As most debuggers (including GDB) do not support these DWARF descriptions yet, it is necessary to still make it possible to generate the old GNAT encodings, though. Hence the first change, which introduces an option (-fgnat-encodings=all|gdb|minimal) that selects how much GNAT encodings must be emitted: - -fgnat-encodings=all emits as much encodings as before (i.e. before these series of patches); - -fgnat-encodings=gdb (the default) emits all the standard DWARF that the current GDB can handle (so this will vary with time) and emit GNAT encodings for the rest; - -fgnat-encodings=minimal emits as much standard DWARF as possible in the compiler and still emit GNAT encodings for the rest (this will vary with time as well). At the moment, there is no difference between -fgnat-encodings=all|gdb but I hope this will change soon thanks to ongoing work on GDB (for instance: ). The remaining commits enhance the DWARF back-end (mostly dwarf2out.c), the Ada front-end (mostly gcc/ada/gcc-interface/*) and sometimes adapts the Fortran front-end as well in order to emit this new DWARF. In order to do so, it sometimes introduces new language hooks to pass information that aren't available in trees. The result has been bootstrapped and regtested successfully on x86_64-linux. Besides, this triggers no regression by default (-fgnat-encodings=gdb). Note however that being unable to test -fgnat-encodings=minimal under with debugger right now, I also have written a small Python testsuite using pyelftools[1] in order to check for a few examples that the expected DIEs/attributes are properly generated (that was useful during development but is very ad-hoc, so I haven't published it yet). Ok for trunk? Thank you in advance for the review! [1] https://github.com/eliben/pyelftools/ -- Pierre-Marie de Rodat