From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31307 invoked by alias); 9 Jan 2007 17:01:38 -0000 Received: (qmail 31286 invoked by uid 22791); 9 Jan 2007 17:01:34 -0000 X-Spam-Check-By: sourceware.org Received: from intrepid.190.195.192.in-addr.arpa (HELO intrepid.intrepid.com) (192.195.190.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Jan 2007 17:01:29 +0000 Received: from DELORIAN ([10.10.10.10]) by intrepid.intrepid.com (8.13.8/8.13.8) with ESMTP id l09H1NEQ011829; Tue, 9 Jan 2007 09:01:24 -0800 From: "Gary Funck" To: Cc: "'Jim Wilson'" Subject: RE: how to support C type qualifiers applied to arrays? Date: Tue, 09 Jan 2007 17:01:00 -0000 Message-ID: <000501c7340f$d4c8ed40$0a0a0a0a@DELORIAN> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1167689747.2505.17.camel@localhost.localdomain> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00147.txt.bz2 Jim Wilson wrote (in part): > This seems to answer the question I asked long ago. Why are we trying > to put back qualifiers from the decl? Because gen_type_die stripped > them off. This seems wrong. > It seems that the use of type_main_variant() dates back to the original port of the DWARF 1 generator to the DWARF 2 implementation. I didn't try understanding the DWARF 1 generator in detail, but it seemed that the use of the type's main variant helped limit the number of unique type dies that were generated. In any event, it doesn't appear that there is a compelling reason to continue to use the type_main_variant() for DWARF 2 generatiion, especially in light of the fact that in some cases the DWARF 2 information is incorrect in the current implmentation. There are of course the risks that you mentioned in your reply that there may now be implicit assumptions made by the various clients (C, C++, Fortran, Ada, for example) regarding dependencies upon the type_main_variant(), but we may have to deal with those issues as they arise. > If we fix gen_type_die to stop calling type_main_variant, and > if we fix > gen_variable_die to stop adding back the type qualifiers, > then I get the > right result. So I think I was on the right track before, we > just need > another little change to gen_type_die in addition to what I already > described. I'll give this a try, and follow up.