From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlTor-0000dr-Kp for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:26:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlTop-0000bZ-G8 for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:26:36 -0400 Received: from [199.232.76.173] (port=46902 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlTop-0000bW-A0 for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:26:35 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:54021) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KlToo-0001p7-Lz for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:26:35 -0400 Message-ID: <48E52067.6080408@mail.berlios.de> Date: Thu, 02 Oct 2008 21:26:31 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets Content-Type: multipart/mixed; boundary="------------020703030304050105010506" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers This is a multi-part message in MIME format. --------------020703030304050105010506 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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 --------------020703030304050105010506 Content-Type: text/x-diff; name="lookup.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lookup.patch" 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; +#endif + for (s = syminfos; s; s = s->next) { sym = s->disas_symtab; for (i = 0; i < s->disas_num_syms; i++) { --------------020703030304050105010506--