From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlW6Y-0003tA-Ib for qemu-devel@nongnu.org; Thu, 02 Oct 2008 17:53:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlW6W-0003pe-DP for qemu-devel@nongnu.org; Thu, 02 Oct 2008 17:53:01 -0400 Received: from [199.232.76.173] (port=38768 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlW6W-0003pI-8A for qemu-devel@nongnu.org; Thu, 02 Oct 2008 17:53:00 -0400 Received: from relay01.mx.bawue.net ([193.7.176.67]:60358) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlW6W-0007LU-02 for qemu-devel@nongnu.org; Thu, 02 Oct 2008 17:53:00 -0400 Date: Thu, 2 Oct 2008 23:52:56 +0200 From: Thiemo Seufer Subject: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets Message-ID: <20081002215256.GD13440@networkno.de> References: <48E52067.6080408@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48E52067.6080408@mail.berlios.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers Stefan Weil wrote: > For 64 bit targets, lookup_symbol() compares a 64-bit target address > with a 32 bit symbol address. This only works for addresses less than 2^32. > > MIPS64 kernels use addresses larger than 0xffffffff80000000, > so qemu.log never shows symbolic names. > > My patch is a workaround which works with Qemu's 32 bit address hack. > Please apply it to Qemu trunk. > > Maybe a better solution would use symbol addresses without shortening > them to 32 bits. > > Regards > Stefan > > Fix symbol lookup for mips64* targets. > > Signed-off-by: Stefan Weil > > Index: disas.c > =================================================================== > --- disas.c (Revision 5400) > +++ disas.c (Arbeitskopie) > @@ -309,6 +309,11 @@ > struct syminfo *s; > target_ulong addr; > > +#if defined(TARGET_MIPS64) > + /* Adresses in syminfos are 32 bit values. */ > + orig_addr &= 0xffffffff; This isn't true in general, not all MIPS64 kernels use the -msym32 optimization. Thiemo