Search
lxdream.org :: lxdream/src/x86dasm/x86dasm.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/x86dasm/x86dasm.c
changeset 925:7cbcc51db63d
prev920:1e6a29649b56
next939:6f2302afeb89
author nkeynes
date Sun Dec 14 06:36:49 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Fix 64-bit disassembly
file annotate diff log raw
1.1 --- a/src/x86dasm/x86dasm.c Thu Dec 04 09:06:35 2008 +0000
1.2 +++ b/src/x86dasm/x86dasm.c Sun Dec 14 06:36:49 2008 +0000
1.3 @@ -51,12 +51,12 @@
1.4 void x86_disasm_block(FILE *out, void *start, uint32_t len)
1.5 {
1.6 uintptr_t start_addr = (uintptr_t)start;
1.7 - uint32_t pc;
1.8 + uintptr_t pc;
1.9 x86_disasm_init( start, start_addr, len );
1.10 for( pc = start_addr; pc < start_addr + len; ) {
1.11 char buf[256];
1.12 char op[256];
1.13 - uint32_t pc2 = x86_disasm_instruction( pc, buf, sizeof(buf), op );
1.14 + uintptr_t pc2 = x86_disasm_instruction( pc, buf, sizeof(buf), op );
1.15 fprintf( out, "%08X: %-20s %s\n", pc, op, buf );
1.16 pc = pc2;
1.17 }
1.18 @@ -66,7 +66,7 @@
1.19 {
1.20 init_disassemble_info( &x86_disasm_info, NULL, x86_disasm_output );
1.21 x86_disasm_info.arch = bfd_arch_i386;
1.22 -#if SH4_TRANSLATOR == TARGET_X86_64
1.23 +#if SIZEOF_VOID_P == 8
1.24 x86_disasm_info.mach = bfd_mach_x86_64_intel_syntax;
1.25 #else
1.26 x86_disasm_info.mach = bfd_mach_i386_i386_intel_syntax;
1.27 @@ -116,7 +116,7 @@
1.28 }
1.29 }
1.30
1.31 -uint32_t x86_disasm_instruction( uintptr_t pc, char *buf, int len, char *opcode )
1.32 +uintptr_t x86_disasm_instruction( uintptr_t pc, char *buf, int len, char *opcode )
1.33 {
1.34 int count, i;
1.35
.