#include <x86dis.h>
Inheritance diagram for x86dis:
Public Member Functions | |
x86dis () | |
x86dis (int opsize, int addrsize) | |
virtual | ~x86dis () |
virtual dis_insn * | decode (byte *code, int maxlen, CPU_ADDR addr) |
virtual dis_insn * | duplicateInsn (dis_insn *disasm_insn) |
virtual void | getOpcodeMetrics (int &min_length, int &max_length, int &min_look_ahead, int &avg_look_ahead, int &addr_align) |
virtual char * | getName () |
virtual byte | getSize (dis_insn *disasm_insn) |
int | load (ht_object_stream *f) |
virtual OBJECT_ID | object_id () const |
virtual char * | str (dis_insn *disasm_insn, int options) |
virtual char * | strf (dis_insn *disasm_insn, int options, char *format) |
virtual void | store (ht_object_stream *f) |
virtual bool | validInsn (dis_insn *disasm_insn) |
Public Attributes | |
int | opsize |
int | addrsize |
Protected Member Functions | |
void | decode_insn (x86opc_insn *insn) |
void | decode_modrm (x86_insn_op *op, char size, int allow_reg, int allow_mem, int mmx) |
void | decode_op (x86_insn_op *op, x86opc_insn_op *xop) |
void | decode_sib (x86_insn_op *op, int mod) |
int | esizeaddr (char c) |
int | esizeop (char c) |
byte | getbyte () |
word | getword () |
dword | getdword () |
int | getmodrm () |
int | getsib () |
void | invalidate () |
int | isfloat (char c) |
void | prefixes () |
int | special_param_ambiguity (x86dis_insn *disasm_insn) |
void | str_format (char **str, char **format, char *p, char *n, char *op[3], int oplen[3], char stopchar, int print) |
virtual void | str_op (char *opstr, int *opstrlen, x86dis_insn *insn, x86_insn_op *op, bool explicit_params) |
Protected Attributes | |
x86dis_insn | insn |
char | insnstr [256] |
unsigned char * | codep |
unsigned char * | ocodep |
int | seg |
int | addr |
byte | c |
int | modrm |
int | sib |
int | maxlen |
|
|
|
|
|
|
|
Implements Disassembler. Definition at line 69 of file x86dis.cc. References addr, CPU_ADDR::addr32, c, codep, decode_insn(), dis_insn, x86dis_insn::eaddrsize, x86dis_insn::eopsize, x86_insn_op::imm, insn, x86dis_insn::invalid, x86dis_insn::lockprefix, maxlen, modrm, x86dis_insn::name, ocodep, x86dis_insn::op, x86dis_insn::opcode, opsize, prefixes(), x86dis_insn::repprefix, seg, x86dis_insn::segprefix, sib, x86_insn_op::size, x86dis_insn::size, x86_insn_op::type, x86_insns, X86_OPTYPE_EMPTY, X86_OPTYPE_IMM, and X86_PREFIX_NO. Referenced by x86dis_vxd::decode(), and srt_x86(). |
|
|
Definition at line 105 of file x86dis.cc. References decode_sib(), x86dis_insn::eaddrsize, esizeop(), getbyte(), getdword(), getmodrm(), getword(), insn, invalidate(), isfloat(), x86_insn_op::mem, mkmod, mkrm, x86_insn_op::mmx, modrm, modrm16_1, modrm16_2, x86_insn_op::reg, size, x86_insn_op::size, x86_insn_op::type, X86_ADDRSIZE16, X86_OPTYPE_MEM, X86_OPTYPE_MMX, X86_OPTYPE_REG, and X86_REG_NO. Referenced by decode_op(). |
|
Definition at line 248 of file x86dis.cc. References addr, addrsize, x86_insn_op::crx, decode_modrm(), x86_insn_op::drx, x86dis_insn::eaddrsize, esizeop(), x86opc_insn_op::extendedsize, x86opc_insn_op::extra, x86_insn_op::farptr, getbyte(), getdword(), getmodrm(), getword(), x86_insn_op::imm, insn, invalidate(), isfloat(), x86_insn_op::mem, mkreg, mkrm, x86_insn_op::mmx, x86_insn_op::reg, x86_insn_op::seg, x86opc_insn_op::size, x86_insn_op::size, SIZE_P, x86_insn_op::stx, x86_insn_op::trx, x86_insn_op::type, x86opc_insn_op::type, TYPE_0, TYPE_A, TYPE_C, TYPE_D, TYPE_E, TYPE_F, TYPE_Fx, TYPE_G, TYPE_I, TYPE_Is, TYPE_Ix, TYPE_J, TYPE_M, TYPE_O, TYPE_P, TYPE_Q, TYPE_R, TYPE_Rx, TYPE_S, TYPE_Sx, TYPE_T, X86_ADDRSIZE16, X86_ADDRSIZE32, X86_OPTYPE_CRX, X86_OPTYPE_DRX, X86_OPTYPE_FARPTR, X86_OPTYPE_IMM, X86_OPTYPE_MEM, X86_OPTYPE_MMX, X86_OPTYPE_REG, X86_OPTYPE_SEG, X86_OPTYPE_STX, X86_OPTYPE_TRX, and X86_REG_NO. Referenced by decode_insn(). |
|
Definition at line 457 of file x86dis.cc. References getbyte(), getdword(), getsib(), x86_insn_op::mem, mkbase, mkindex, mkscale, sib, sibbase, sibindex, sibscale, X86_REG_BP, and X86_REG_NO. Referenced by decode_modrm(). |
|
Implements Disassembler. |
|
Definition at line 501 of file x86dis.cc. References x86dis_insn::eaddrsize, insn, SIZE_B, SIZE_C, SIZE_D, SIZE_L, SIZE_P, SIZE_Q, SIZE_S, SIZE_T, SIZE_V, SIZE_W, and X86_ADDRSIZE16. |
|
Definition at line 528 of file x86dis.cc. References x86dis_insn::eopsize, insn, SIZE_B, SIZE_C, SIZE_D, SIZE_L, SIZE_P, SIZE_Q, SIZE_S, SIZE_T, SIZE_V, SIZE_W, and X86_OPSIZE16. Referenced by decode_modrm(), and decode_op(). |
|
Definition at line 555 of file x86dis.cc. References addr, byte, codep, invalidate(), maxlen, and ocodep. Referenced by decode_insn(), decode_modrm(), decode_op(), decode_sib(), getmodrm(), getsib(), and prefixes(). |
|
Definition at line 580 of file x86dis.cc. References addr, codep, dword, invalidate(), maxlen, and ocodep. Referenced by decode_modrm(), decode_op(), and decode_sib(). |
|
Definition at line 603 of file x86dis.cc. References getbyte(), and modrm. Referenced by decode_insn(), decode_modrm(), and decode_op(). |
|
Implements Disassembler. |
|
Implements Disassembler. |
|
Definition at line 614 of file x86dis.cc. References getbyte(), and sib. Referenced by decode_sib(). |
|
Implements Disassembler. Definition at line 620 of file x86dis.cc. References byte, and dis_insn. Referenced by srt_x86(). |
|
Definition at line 566 of file x86dis.cc. References addr, codep, invalidate(), maxlen, ocodep, and word. Referenced by decode_modrm(), and decode_op(). |
|
Definition at line 625 of file x86dis.cc. References insn, and x86dis_insn::invalid. Referenced by decode_insn(), decode_modrm(), decode_op(), getbyte(), getdword(), and getword(). |
|
Definition at line 630 of file x86dis.cc. References SIZE_L, SIZE_S, and SIZE_T. Referenced by decode_modrm(), and decode_op(). |
|
loads object from object stream.
Reimplemented from Object. Definition at line 641 of file x86dis.cc. References addrsize, ht_layer_stream::get_error(), GET_INT_HEX, and opsize. |
|
Reimplemented from Object. Reimplemented in x86dis_vxd. Definition at line 648 of file x86dis.cc. References ATOM_DISASM_X86. |
|
Definition at line 653 of file x86dis.cc. References addrsize, c, codep, x86dis_insn::eaddrsize, x86dis_insn::eopsize, getbyte(), insn, x86dis_insn::lockprefix, ocodep, opsize, x86dis_insn::repprefix, x86dis_insn::segprefix, X86_ADDRSIZE16, X86_ADDRSIZE32, X86_OPSIZE16, X86_OPSIZE32, X86_PREFIX_CS, X86_PREFIX_DS, X86_PREFIX_ES, X86_PREFIX_FS, X86_PREFIX_GS, X86_PREFIX_LOCK, X86_PREFIX_NO, X86_PREFIX_REPNZ, X86_PREFIX_REPZ, and X86_PREFIX_SS. Referenced by decode(). |
|
Definition at line 701 of file x86dis.cc. References x86dis_insn::name, x86dis_insn::op, x86_insn_op::type, X86_OPTYPE_CRX, X86_OPTYPE_DRX, X86_OPTYPE_MEM, X86_OPTYPE_MMX, X86_OPTYPE_REG, X86_OPTYPE_SEG, X86_OPTYPE_STX, and X86_OPTYPE_TRX. Referenced by strf(). |
|
stores object. Reimplemented from Object. Definition at line 1100 of file x86dis.cc. References addrsize, opsize, and PUT_INT_HEX. |
|
Reimplemented from Disassembler. Definition at line 1047 of file x86dis.cc. References dis_insn, DISASM_STRF_DEFAULT_FORMAT, options, and strf(). Referenced by srt_x86(). |
|
Definition at line 956 of file x86dis.cc. References DIS_STYLE_TABSIZE, DISASM_STRF_COND, DISASM_STRF_FIRST, DISASM_STRF_NAME, DISASM_STRF_PREFIX, DISASM_STRF_SECOND, DISASM_STRF_THIRD, DISASM_STRF_VAR, e_cs_default, e_cs_symbol, Disassembler::get_cs(), insnstr, and NULL. Referenced by strf(). |
|
Reimplemented in x86dis_vxd. Definition at line 727 of file x86dis.cc. References CPU_ADDR::addr32, addr_sym_func, addr_sym_func_context, x86_insn_op::crx, x86_insn_op::drx, dword, e_cs_default, e_cs_number, e_cs_symbol, x86dis_insn::eaddrsize, x86_insn_op::farptr, Disassembler::get_cs(), Disassembler::hexd(), x86_insn_op::imm, x86_insn_op::mem, x86_insn_op::mmx, x86dis_insn::name, NULL, x86_insn_op::reg, x86_insn_op::seg, seg, x86dis_insn::segprefix, x86_insn_op::size, x86_insn_op::stx, x86_insn_op::trx, x86_insn_op::type, X86_ADDRSIZE16, X86_ADDRSIZE32, X86_OPTYPE_CRX, X86_OPTYPE_DRX, X86_OPTYPE_FARPTR, X86_OPTYPE_IMM, X86_OPTYPE_MEM, X86_OPTYPE_MMX, X86_OPTYPE_REG, X86_OPTYPE_SEG, X86_OPTYPE_STX, X86_OPTYPE_TRX, X86_PREFIX_NO, X86_REG_NO, x86_regs, x86_segs, and X86DIS_STYLE_OPTIMIZE_ADDR. Referenced by x86dis_vxd::str_op(), and strf(). |
|
Implements Disassembler. Definition at line 1052 of file x86dis.cc. References dis_insn, DIS_STYLE_HIGHLIGHT, Disassembler::disable_highlighting(), Disassembler::enable_highlighting(), x86dis_insn::eopsize, insn, insnstr, x86dis_insn::lockprefix, x86dis_insn::name, x86dis_insn::op, x86dis_insn::repprefix, special_param_ambiguity(), str_format(), str_op(), X86_OPSIZE16, X86_OPSIZE32, X86_PREFIX_LOCK, X86_PREFIX_REPNZ, X86_PREFIX_REPZ, and X86DIS_STYLE_EXPLICIT_MEMSIZE. Referenced by str(). |
|
Implements Disassembler. Definition at line 1106 of file x86dis.cc. References dis_insn. Referenced by srt_x86(). |
|
Definition at line 64 of file x86dis.h. Referenced by decode(), decode_op(), getbyte(), getdword(), and getword(). |
|
Definition at line 57 of file x86dis.h. Referenced by decode_op(), load(), prefixes(), store(), and x86dis(). |
|
Definition at line 65 of file x86dis.h. Referenced by decode(), decode_insn(), and prefixes(). |
|
Definition at line 62 of file x86dis.h. Referenced by decode(), getbyte(), getdword(), getword(), and prefixes(). |
|
Definition at line 59 of file x86dis.h. Referenced by decode(), decode_insn(), decode_modrm(), decode_op(), duplicateInsn(), esizeaddr(), esizeop(), invalidate(), prefixes(), and strf(). |
|
Definition at line 60 of file x86dis.h. Referenced by str_format(), and strf(). |
|
Definition at line 68 of file x86dis.h. Referenced by decode(), getbyte(), getdword(), and getword(). |
|
Definition at line 66 of file x86dis.h. Referenced by decode(), decode_modrm(), and getmodrm(). |
|
Definition at line 62 of file x86dis.h. Referenced by decode(), getbyte(), getdword(), getword(), and prefixes(). |
|
Definition at line 57 of file x86dis.h. Referenced by decode(), load(), prefixes(), store(), and x86dis(). |
|
|
|
Definition at line 67 of file x86dis.h. Referenced by decode(), decode_sib(), and getsib(). |