From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5796 invoked by alias); 23 Apr 2007 16:49:08 -0000 Received: (qmail 5787 invoked by uid 22791); 23 Apr 2007 16:49:07 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 23 Apr 2007 17:49:05 +0100 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l3NGn3jZ002159 for ; Mon, 23 Apr 2007 12:49:03 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l3NGn2Tw013832 for ; Mon, 23 Apr 2007 12:49:02 -0400 Received: from ironwood.lan (vpn-15-49.rdu.redhat.com [10.11.15.49]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l3NGn1El001411 for ; Mon, 23 Apr 2007 12:49:01 -0400 Date: Mon, 23 Apr 2007 16:57:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: Re: [RFC] dwarf2_read_address(): sign extend as appropriate Message-ID: <20070423094900.15a047d2@ironwood.lan> In-Reply-To: <200704231505.l3NF5KV5025451@d12av02.megacenter.de.ibm.com> References: <20070420163312.56701614@ironwood.lan> <200704231505.l3NF5KV5025451@d12av02.megacenter.de.ibm.com> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.4; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2007-04/txt/msg00310.txt.bz2 On Mon, 23 Apr 2007 17:05:20 +0200 (CEST) "Ulrich Weigand" wrote: > Kevin Buettner wrote: > > > Any comments regarding the patch below? > > > > I wrote it last summer, so my memory about it is rather hazy aside > > from the fact that it fixed a bunch of C++ frame base problems on > > mips64 targets. > > > > It shouldn't affect any architecture other than mips because mips is > > the only one which defines an integer_to_address method. It also > > addresses Andrew's FIXME comment from nearly four years ago... > > > > * dwarf2expr.c (unsigned_address_type): Add forward declaration. > > (dwarf2_read_address): Sign extend return address as required by > > target architecture. > > I've recently changed a very similar place, dwarf_expr_read_reg in > dwarf2loc.c, to use a new "address_from_register" function to solve > the same problem: > http://sourceware.org/ml/gdb-patches/2006-11/msg00134.html > > Is there any reason you couldn't use the same function here? We can't use address_from_register() in this instance since dwarf2_read_address() is not fetching an address from a register, but rather from some DWARF2 info. Kevin