From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10174 invoked by alias); 10 Sep 2002 16:57:29 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10110 invoked from network); 10 Sep 2002 16:57:26 -0000 Received: from unknown (HELO delta.ds2.pg.gda.pl) (213.192.72.1) by sources.redhat.com with SMTP; 10 Sep 2002 16:57:26 -0000 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id SAA25899; Tue, 10 Sep 2002 18:57:49 +0200 (MET DST) Date: Tue, 10 Sep 2002 09:57:00 -0000 From: "Maciej W. Rozycki" To: Fred Fish cc: binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: MIPS sign extension of addresses In-Reply-To: <200209101549.g8AFnIb24401@beeville.vert.intrinsity.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-09/txt/msg00081.txt.bz2 On Tue, 10 Sep 2002, Fred Fish wrote: > Most of the problems I fixed had to do with the fact that BFD takes > the 32 bit unsigned addresses from object and executable files, sign > extends them, and then stores the result as a bfd_vma, which is an > unsigned 64 bit type (unsigned long long). For example, the unsigned > 32 bit address 0x80020004 becomes an unsigned 64 bit bfd_vma/CORE_ADDR > of 0xffffffff80020004. The bfd_vma type is used to define gdb's > CORE_ADDR types. Well, that seems the reason of the trouble -- for MIPS addresses in object and executable files should be treated as signed and bfd_vma should be a signed type since that's how MIPS works. The two addresses you quote are indeed equivalent. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +