From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3999 invoked by alias); 24 Dec 2009 19:40:23 -0000 Received: (qmail 3983 invoked by uid 22791); 24 Dec 2009 19:40:22 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Dec 2009 19:40:16 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBOJdqfM009975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Dec 2009 14:39:52 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBOJdov2011516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Dec 2009 14:39:52 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id nBOJdnu5011217; Thu, 24 Dec 2009 20:39:49 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id nBOJdnZY011216; Thu, 24 Dec 2009 20:39:49 +0100 Date: Thu, 24 Dec 2009 19:40:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/DWARF] Add DW_AT_GNAT_descriptive_type support Message-ID: <20091224193948.GA7936@host0.dyn.jankratochvil.net> References: <20091224180657.GV5942@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091224180657.GV5942@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes 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 X-SW-Source: 2009-12/txt/msg00390.txt.bz2 Hi Joel, On Thu, 24 Dec 2009 19:06:57 +0100, Joel Brobecker wrote: > Quick summary: The debugging info for Ada code follows an encoding > (document in exp_dbug.ads in the GCC sources) which requires http://gcc.gnu.org/viewcvs/trunk/gcc/ada/exp_dbug.ads?view=co Record Types with Variable-Length Fields > "parallel lookups". For instance, a record type with variable-size > fields will see a parallel type named type___XVE being generated > by the compiler. The debugger is supposed to look this type up > in order to obtain some info necessary to decode the type. > > The new DW_AT_GNAT_descriptive_type attribute allows us to speed up > this lookup when using DWARF, DWARF provides DW_FORM_block* for such varying types. Such DW_FORM_block* producer is implemented in gfortran upstream and it is implemented as the VLA patchset (currently waiting on a discussion + resubmit from me) for GDB: http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00612.html http://sourceware.org/gdb/wiki/ArcherBranchManagement - archer-jankratochvil-vla It is true such DW_FORM_block* bytecode is not available for STABS. But such DWARF-specific DW_AT_GNAT_descriptive_type attribute would exist in DWARF only to unify debuginfo producer/consumer with less featureful STABS. While it may make sense from the practical point of view I would like a clear statement this is the reason for this "gross" DW_AT_GNAT_descriptive_type code. With properly implemented DWARF-only DW_FORM_block* producer for GNAT the GDB consumer would be IMO some small extension of dynamic types (to accept DW_FORM_block* for several more DW_AT_* attributes and reuse the existing dynamic->static converting code in check_typedef). Regards, Jan