From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18401 invoked by alias); 1 Jun 2010 19:07:47 -0000 Received: (qmail 18390 invoked by uid 22791); 1 Jun 2010 19:07:46 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD 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; Tue, 01 Jun 2010 19:07:36 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o51J7U2M026822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Jun 2010 15:07:31 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o51J7UG2005011; Tue, 1 Jun 2010 15:07:30 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o51J7SkG015610; Tue, 1 Jun 2010 15:07:29 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 936653782DC; Tue, 1 Jun 2010 13:07:28 -0600 (MDT) From: Tom Tromey To: "Pierre Muller" Cc: Subject: Re: [RFA-v3] dwarf2read.c: Avoid complaint for char array of unspecified size References: <38685.0063725889$1274473713@news.gmane.org> <002201caf93d$e6ea8190$b4bf84b0$@muller@ics-cnrs.unistra.fr> <34200.8848595016$1274864816@news.gmane.org> <000f01cafe4e$17eccea0$47c66be0$@muller@ics-cnrs.unistra.fr> Reply-To: Tom Tromey Date: Tue, 01 Jun 2010 19:07:00 -0000 In-Reply-To: <000f01cafe4e$17eccea0$47c66be0$@muller@ics-cnrs.unistra.fr> (Pierre Muller's message of "Fri, 28 May 2010 12:11:09 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-06/txt/msg00013.txt.bz2 >>>>> "Pierre" == Pierre Muller writes: Pierre> OK, I tried to follow that route, Pierre> the tricky part was that we don't really know which objfile type Pierre> is the same size as an address, but the patch is a bit lengthy... Yeah, I don't know this either. Your approach seems reasonable. Pierre> At the same time, I discovered that DW_AT_count was not supported, Pierre> (maybe no compiler uses that, but it can't hurt to add Pierre> support for this). Thanks for doing this. Pierre> + /* Test "long long int", "long int", and "int" objfile types, Pierre> + and select the last one having a size above or equal to the Pierre> + architecture address size. */ I think you should test these in the reverse order: int, then long, then long long. This assures you will find the smallest type that matches. This patch is ok with that change. Tom