summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-04-12 15:44:35 +0200
committerStefan Weil <sw@weilnetz.de>2012-04-15 21:25:18 +0200
commitb0b0f1c964bb7643a6d4469ffd8157de84741d1f (patch)
tree9a88269dd41bbf72189f65af8117445fd03369f6
parent3ba19255450666869ecfe764774c2371f989e68b (diff)
downloadfocaccia-qemu-b0b0f1c964bb7643a6d4469ffd8157de84741d1f.tar.gz
focaccia-qemu-b0b0f1c964bb7643a6d4469ffd8157de84741d1f.zip
disas: Replace 'unsigned long' by 'uintptr_t'
This is needed for w64. It changes nothing for other hosts.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
-rw-r--r--disas.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/disas.c b/disas.c
index 4f2c4e4cb9..27071c3bc1 100644
--- a/disas.c
+++ b/disas.c
@@ -268,7 +268,7 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
 /* Disassemble this for me please... (debugging). */
 void disas(FILE *out, void *code, unsigned long size)
 {
-    unsigned long pc;
+    uintptr_t pc;
     int count;
     struct disassemble_info disasm_info;
     int (*print_insn)(bfd_vma pc, disassemble_info *info);
@@ -276,7 +276,7 @@ void disas(FILE *out, void *code, unsigned long size)
     INIT_DISASSEMBLE_INFO(disasm_info, out, fprintf);
 
     disasm_info.buffer = code;
-    disasm_info.buffer_vma = (unsigned long)code;
+    disasm_info.buffer_vma = (uintptr_t)code;
     disasm_info.buffer_length = size;
 
 #ifdef HOST_WORDS_BIGENDIAN
@@ -320,8 +320,8 @@ void disas(FILE *out, void *code, unsigned long size)
 	    (long) code);
     return;
 #endif
-    for (pc = (unsigned long)code; size > 0; pc += count, size -= count) {
-	fprintf(out, "0x%08lx:  ", pc);
+    for (pc = (uintptr_t)code; size > 0; pc += count, size -= count) {
+        fprintf(out, "0x%08" PRIxPTR ":  ", pc);
 	count = print_insn(pc, &disasm_info);
 	fprintf(out, "\n");
 	if (count < 0)