From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30492 invoked by alias); 5 Jan 2008 15:37:37 -0000 Received: (qmail 30483 invoked by uid 22791); 5 Jan 2008 15:37:37 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 05 Jan 2008 15:37:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0D3F02A9634; Sat, 5 Jan 2008 10:37:18 -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 g96-6rNFJN3t; Sat, 5 Jan 2008 10:37:17 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3BA202A9617; Sat, 5 Jan 2008 10:37:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 0060AE7ACB; Sat, 5 Jan 2008 07:37:09 -0800 (PST) Date: Sat, 05 Jan 2008 15:37:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA/DWARF] Set TYPE_FLAG_STUB for enum DIEs that are declarations only Message-ID: <20080105153709.GH5975@adacore.com> References: <20080103153952.GC582@adacore.com> <20080103154055.GD582@adacore.com> <20080105150514.GF5975@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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: 2008-01/txt/msg00084.txt.bz2 > And this is supposed to be known to Joe Random Hacker reading the code > because ...? Should we assume that whoever reads dwarf2read.c is > necessarily a DWARF-2 expert? I honestly believe that whoever reads dwarf2read.c needs to understand a minimum the DWARF standard - otherwise he's wasting his time. And I personally not in the business of duplicating the DWARF standard in our code unless it's obscure. > That's not the kind of comment I was suggesting. I meant some summary > of the long explanation you posted as a preamble to the patch, which > explained why debugging Ada programs needed that. The preample was an introduction to an part of the Ada language, not a description of a problem. The "stub" DIE is a routine concept, that we see all the time with C opaque types. In fact, any type can be incomplete. But rather than arguing this ad vitam aeternam, here's a suggestion: /* Enumeration DIEs descriptions can be imcomplete. In Ada, any type can be declared as private in the package spec, and then defined only inside the package body. Such types are known as Taft Amendment Types. When another package uses such a type, an incomplete DIE may be generated by the compiler. */ -- Joel