From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30957 invoked by alias); 26 Jun 2009 00:54:58 -0000 Received: (qmail 30948 invoked by uid 22791); 26 Jun 2009 00:54:58 -0000 X-SWARE-Spam-Status: No, hits=-1.8 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.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Jun 2009 00:54:48 +0000 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id n5Q0skgu011192 for ; Thu, 25 Jun 2009 17:54:46 -0700 Received: from gxk26 (gxk26.prod.google.com [10.202.11.26]) by zps37.corp.google.com with ESMTP id n5Q0sBVY022739 for ; Thu, 25 Jun 2009 17:54:44 -0700 Received: by gxk26 with SMTP id 26so158823gxk.13 for ; Thu, 25 Jun 2009 17:54:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.120.17 with SMTP id s17mr2585761agc.109.1245977683324; Thu, 25 Jun 2009 17:54:43 -0700 (PDT) In-Reply-To: References: <20090620000402.C37E5843F5@localhost> Date: Fri, 26 Jun 2009 00:54:00 -0000 Message-ID: Subject: Re: [RFA] comdat types From: Doug Evans To: Cary Coutant Cc: tromey@redhat.com, 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/msg00699.txt.bz2 On Thu, Jun 25, 2009 at 5:01 PM, Cary Coutant wrote: >> 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. I looked back, and apparently it there's by request of the dwarf committee. Since it's there I made use of it, but that can change of course.