qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets
@ 2008-10-02 19:26 Stefan Weil
  2008-10-02 19:53 ` Blue Swirl
  2008-10-02 21:52 ` [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets Thiemo Seufer
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Weil @ 2008-10-02 19:26 UTC (permalink / raw)
  To: QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

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


[-- Attachment #2: lookup.patch --]
[-- Type: text/x-diff, Size: 531 bytes --]

Fix symbol lookup for mips64* targets.

Signed-off-by: Stefan Weil <weil@mail.berlios.de> 

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++) {

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-10-20 17:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 19:26 [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets Stefan Weil
2008-10-02 19:53 ` Blue Swirl
2008-10-16 19:57   ` [Qemu-devel] [PATCH] Improve symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets) Stefan Weil
2008-10-16 20:32     ` [Qemu-devel] [PATCH] Improve symbol lookup Stefan Weil
2008-10-16 20:41       ` Laurent Desnogues
2008-10-17 17:28       ` [Qemu-devel] [PATCH] Improve symbol lookup for system and user mode Stefan Weil
2008-10-20 17:16         ` Blue Swirl
2008-10-16 20:38     ` [Qemu-devel] [PATCH] Improve symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets) Laurent Desnogues
2008-10-02 21:52 ` [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets Thiemo Seufer
2008-10-03 10:09   ` Stefan Weil
2008-10-03 10:29     ` Laurent Desnogues
2008-10-03 17:14       ` Blue Swirl
2008-10-03 17:13     ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).