From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5243 invoked by alias); 22 Jul 2004 00:41:44 -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 5234 invoked from network); 22 Jul 2004 00:41:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 22 Jul 2004 00:41:44 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6M0fhe3012925 for ; Wed, 21 Jul 2004 20:41:43 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6M0fha17923; Wed, 21 Jul 2004 20:41:43 -0400 Received: from localhost.localdomain (vpn50-37.rdu.redhat.com [172.16.50.37]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i6M0fgrF029159; Wed, 21 Jul 2004 20:41:42 -0400 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.11/8.12.10) with SMTP id i6M0fa2M011870; Wed, 21 Jul 2004 17:41:36 -0700 Date: Thu, 22 Jul 2004 00:41:00 -0000 From: Kevin Buettner To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, Mark Kettenis , hunt@redhat.com Subject: Re: [RFA] dwarf2-frame.c sign extension patch Message-Id: <20040721174136.7eb32412@saguaro> In-Reply-To: <20040721211723.GA21338@nevyn.them.org> References: <1090350684.3030.10.camel@dragon> <200407212029.i6LKThsR022356@copland.kettenis.dyndns.org> <20040721211723.GA21338@nevyn.them.org> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00294.txt.bz2 On Wed, 21 Jul 2004 17:17:23 -0400 Daniel Jacobowitz wrote: > The rest I have no comment on, but this issue I know... > > On Wed, Jul 21, 2004 at 10:29:43PM +0200, Mark Kettenis wrote: > > (dwarf2_build_frame_info): Set unit.addr_size. > > > > Why is the old code wrong? The comment clearly says "from unit > > header" which is what the DWARF standard says (or at least implies). > > Theoretically it could change from compilation unit to compilation > > unit. So I think your change to replace it by > > TYPE_LENGTH(builtin_type_void_data_ptr) is wrong. > > The old code doesn't do it from the compilation unit header either: > - unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8; > + unit.addr_size = TYPE_LENGTH (builtin_type_void_data_ptr); > > Any use of bits_per_address, IMO, is a bug. Take a look at how this > field is set on MIPS; it's based on the architecture, not the ABI or > the pointer size or the dwarf address size or anything like that. I agree. > TYPE_LENGTH doesn't seem like an ideal replacement. Can we use the > value in the compilation unit header here? I considered doing this, but was told that the information in .debug_frame should be independent of the CU header. I really don't know what the "right" solution is. Kevin