From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30877 invoked by alias); 14 Aug 2009 20:59:05 -0000 Received: (qmail 30826 invoked by uid 22791); 14 Aug 2009 20:59:04 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Aug 2009 20:58:56 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7EKwtXJ031922 for ; Fri, 14 Aug 2009 16:58:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7EKwsn2021650; Fri, 14 Aug 2009 16:58:54 -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 n7EKwrdF009098; Fri, 14 Aug 2009 16:58:53 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id CB0C73784C5; Fri, 14 Aug 2009 14:58:52 -0600 (MDT) To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Support constant DW_AT_data_member_location by GCC PR debug/40659 References: <20090811195300.GA12898@host0.dyn.jankratochvil.net> From: Tom Tromey Reply-To: tromey@redhat.com Date: Fri, 14 Aug 2009 22:34:00 -0000 In-Reply-To: <20090811195300.GA12898@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Tue\, 11 Aug 2009 21\:53\:00 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (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: 2009-08/txt/msg00207.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> 2009-08-11 Jan Kratochvil Jan> Support constant DW_AT_data_member_location by GCC PR debug/40659. Jan> * dwarf2read.c (dwarf2_get_attr_constant_value): Prototype now uses Jan> CORE_ADDR. Jan> (dwarf2_add_field, dwarf2_add_member_fn, read_common_block): Use Jan> dwarf2_get_attr_constant_value. Jan> (read_subrange_type, read_subrange_type): Add new parameter to the Jan> dwarf2_get_attr_constant_value call. Jan> (dwarf2_get_ref_die_offset): Fix the return value comment. Change the Jan> function data type INT to CORE_ADDR. Support also attr_form_is_block. I think this looks pretty good but I do have one comment. Jan> - if (attr_form_is_section_offset (attr)) Jan> - { Jan> - dwarf2_complex_location_expr_complaint (); Jan> - byte_offset = 0; IIUC the patch still will issue a complaint for this construct, but now it just issues a more generic one from dwarf2_get_attr_constant_value. What about putting the more specific checks into that function instead? Would it cause some problem? If not, please do it. If so, don't bother, I think this is ok. Tom