From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5672 invoked by alias); 26 Jun 2009 00:01:16 -0000 Received: (qmail 5200 invoked by uid 22791); 26 Jun 2009 00:01:15 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Jun 2009 00:01:08 +0000 Received: from zps18.corp.google.com (zps18.corp.google.com [172.25.146.18]) by smtp-out.google.com with ESMTP id n5Q01495024157 for ; Fri, 26 Jun 2009 01:01:05 +0100 Received: from an-out-0708.google.com (anab2.prod.google.com [10.100.53.2]) by zps18.corp.google.com with ESMTP id n5Q011LJ007043 for ; Thu, 25 Jun 2009 17:01:01 -0700 Received: by an-out-0708.google.com with SMTP id b2so1542596ana.21 for ; Thu, 25 Jun 2009 17:01:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.133.2 with SMTP id g2mr4175474and.23.1245974461295; Thu, 25 Jun 2009 17:01:01 -0700 (PDT) In-Reply-To: References: <20090620000402.C37E5843F5@localhost> Date: Fri, 26 Jun 2009 00:01:00 -0000 Message-ID: Subject: Re: [RFA] comdat types From: Cary Coutant To: tromey@redhat.com Cc: Doug Evans , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-06/txt/msg00698.txt.bz2 > I'm curious about one thing on this page, and I thought I'd take the > opportunity to ask. =A0DW_TAG_type_unit may have a DW_AT_language child. > But, the language is not mentioned in the suggested method for > computing a type's signature. =A0This seems strange to me: either the > language matters (in which case, it seems like it ought to be in the > signature); or the language does not matter, in which case, why > mention it? DW_AT_language was a late addition, and if I recall correctly, it was at Doug's request because there were still some places in gdb where the language mattered. It's an attribute of the type_unit (just like it is of the compile_unit), not of the type itself, so it's not involved in computing the type signature. Theoretically, if two type definitions from different languages generate the same signature, they're still the same type, and should be merged together. On the other hand, if the language really does matter to gdb, maybe they shouldn't be merged. I'm not sure it's likely enough to matter much, although I think it would be desirable for a C type and the same type in C++ to have the same signature. I had the impression that the dependence on language was a wart, and that ideally, it really shouldn't be necessary, so the language attribute is there only as helpful extra information. > One concern I have is whether there is any chance that the > specification will change between now and when DWARF-4 is published. The DWARF proposal (after a long drawn-out process to finalize the details of the signature computation) is final, and is being incorporated into the next draft specification. The editor has promised me that the new DW_TAG and DW_AT codes are cast in stone. DWARF-4 is closed to new issues now, and I think the chances of any changes are virtually nil. -cary