From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15636 invoked by alias); 14 Jul 2005 14:11:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15138 invoked by uid 22791); 14 Jul 2005 14:10:59 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 14 Jul 2005 14:10:59 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1Dt45Z-0000Dn-OG; Thu, 14 Jul 2005 09:49:22 -0400 Date: Thu, 14 Jul 2005 14:11:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com, Elena Zannoni Subject: Re: [repost] Support DW_AT_count inside DW_TAG_subrange_type Message-ID: <20050714134921.GA769@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com, Elena Zannoni References: <200507141240.48545.ghost@cs.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507141240.48545.ghost@cs.msu.su> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00116.txt.bz2 On Thu, Jul 14, 2005 at 12:40:48PM +0400, Vladimir Prus wrote: > > Hello, > I've got not reply to the following message, which was posted on 31/05/2005. > Any change this patch will go in? Elena has to review dwarf2 reader patches; I've copied her directly. > > Original message below: > > Hi, > the DWARF standard says that the DW_TAG_subrage_type tag can contain either > DW_AT_upper_bound or use DW_AT_count to specify upper bound relatively to > lower bound. The version 6.3 of gdb, and the current CVS, support only > DW_TAG_upper_bound. > > The attached patch adds support for DW_AT_count. > > The changelog entry could be: > 2005-05-31 Vladimur Prus > > dwarf2read.c (read_subrange_type): If no DW_AT_upper_bound attribute > is present, try using DW_AT_count > > > > Comments? > > - Volodya > > --- dwarf2read.c.orig 2004-10-16 04:41:00.000000000 +0400 > +++ dwarf2read.c 2005-05-31 17:38:57.000000000 +0400 > @@ -4794,6 +4794,17 @@ > else > high = dwarf2_get_attr_constant_value (attr, 1); > } > + else > + { > + /* Alternatively, the high boundary can be specified with the > + DW_AT_count attribute, which must be added to the low value. > + */ > + attr = dwarf2_attr (die, DW_AT_count, cu); > + if (attr) > + { > + high = dwarf2_get_attr_constant_value(attr, 0) + low - 1; > + } > + } > > range_type = create_range_type (NULL, base_type, low, high); > -- Daniel Jacobowitz CodeSourcery, LLC