From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28200 invoked by alias); 26 Apr 2012 15:38:15 -0000 Received: (qmail 28162 invoked by uid 22791); 26 Apr 2012 15:38:14 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,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; Thu, 26 Apr 2012 15:37:58 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3QFbwRp028427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Apr 2012 11:37:58 -0400 Received: from host2.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3QFbscc007954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 26 Apr 2012 11:37:56 -0400 Date: Thu, 26 Apr 2012 15:39:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix DW_AT_lower_bound DWARF-4+ defaults Message-ID: <20120426153753.GA3590@host2.jankratochvil.net> References: <20120426150708.GA31687@host2.jankratochvil.net> <87pqau8qan.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pqau8qan.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-04/txt/msg00921.txt.bz2 On Thu, 26 Apr 2012 17:29:36 +0200, Tom Tromey wrote: > I looked at the DWARF 3 spec and it says: > > If the lower bound value is missing, the value is assumed to be a > language-dependent default constant. The default lower bound value for C > or C++ is 0. For Fortran, it is 1. > > So it seems wrong to complain here; All of DWARF 2, 3 and 4 have there also the paragraph: No other default lower bound values are currently defined. Which makes the complaint IMNSHO right. > defaults is informative, not exhaustive, and we should just pick a > reasonable default and not complain. Some reasonable default is picked, maybe we could discuss if this fallback could be improved but I find 0 to be good enough for invalid DWARF input. Thanks, Jan