From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21935 invoked by alias); 21 Jul 2004 21:18:23 -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 21901 invoked from network); 21 Jul 2004 21:18:21 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 21 Jul 2004 21:18:21 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BnOSp-0005aS-BL; Wed, 21 Jul 2004 17:17:23 -0400 Date: Wed, 21 Jul 2004 21:18:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: hunt@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] dwarf2-frame.c sign extension patch Message-ID: <20040721211723.GA21338@nevyn.them.org> Mail-Followup-To: Mark Kettenis , hunt@redhat.com, gdb-patches@sources.redhat.com References: <1090350684.3030.10.camel@dragon> <200407212029.i6LKThsR022356@copland.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200407212029.i6LKThsR022356@copland.kettenis.dyndns.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-07/txt/msg00289.txt.bz2 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. TYPE_LENGTH doesn't seem like an ideal replacement. Can we use the value in the compilation unit header here? -- Daniel Jacobowitz