nkeynes@362: /** nkeynes@561: * $Id$ nkeynes@362: * nkeynes@362: * Wrapper around i386-dis to supply the same behaviour as the other nkeynes@362: * disassembly functions. nkeynes@362: * nkeynes@362: * Copyright (c) 2005 Nathan Keynes. nkeynes@362: * nkeynes@362: * This program is free software; you can redistribute it and/or modify nkeynes@362: * it under the terms of the GNU General Public License as published by nkeynes@362: * the Free Software Foundation; either version 2 of the License, or nkeynes@362: * (at your option) any later version. nkeynes@362: * nkeynes@362: * This program is distributed in the hope that it will be useful, nkeynes@362: * but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@362: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@362: * GNU General Public License for more details. nkeynes@362: */ nkeynes@362: nkeynes@476: #include nkeynes@362: #include "cpu.h" nkeynes@362: #include "mem.h" nkeynes@362: extern const struct cpu_desc_struct x86_cpu_desc; nkeynes@362: nkeynes@365: typedef struct x86_symbol { nkeynes@365: const char *name; nkeynes@365: void *ptr; nkeynes@365: } x86_symbol; nkeynes@365: nkeynes@376: void x86_disasm_block( FILE *out, void *block, uint32_t len ); nkeynes@365: void x86_set_symtab( x86_symbol *symtab, int num_symbols ); nkeynes@1091: void x86_disasm_init(); nkeynes@925: uintptr_t x86_disasm_instruction( uintptr_t pc, char *buf, int len, char *opcode ); nkeynes@1094: void x86_print_symbolic_operand( char *buf, int hex, uintptr_t disp );