From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15278 invoked by alias); 14 Jul 2005 08:41:01 -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 15258 invoked by uid 22791); 14 Jul 2005 08:40:55 -0000 Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 14 Jul 2005 08:40:55 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1DszGz-00079M-Rv for gdb-patches@sources.redhat.com; Thu, 14 Jul 2005 12:40:52 +0400 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1DszGz-000798-QO for gdb-patches@sources.redhat.com; Thu, 14 Jul 2005 12:40:49 +0400 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: [repost] Support DW_AT_count inside DW_TAG_subrange_type User-Agent: KMail/1.7.2 MIME-Version: 1.0 X-UID: 7510 X-Length: 1997 Date: Thu, 14 Jul 2005 08:41:00 -0000 Content-Type: Multipart/Mixed; boundary="Boundary-00=_QUi1C5YC+kM3nnc" Message-Id: <200507141240.48545.ghost@cs.msu.su> X-SW-Source: 2005-07/txt/msg00115.txt.bz2 --Boundary-00=_QUi1C5YC+kM3nnc Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 660 Hello, I've got not reply to the following message, which was posted on 31/05/2005. Any change this patch will go in? 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 --Boundary-00=_QUi1C5YC+kM3nnc Content-Type: text/x-diff; charset="us-ascii"; name="DW_AT_count.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="DW_AT_count.diff" Content-length: 629 --- 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); --Boundary-00=_QUi1C5YC+kM3nnc--