Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <capstone/platform.h>
#include <capstone/capstone.h>
Go to the source code of this file.
Classes | |
struct | platform |
Macros | |
#define | X86_CODE64 "\x55\x48\x8b\x05\xb8\x13\x00\x00\xe9\xea\xbe\xad\xde\xff\x25\x23\x01\x00\x00\xe8\xdf\xbe\xad\xde\x74\xff" |
#define | X86_CODE16 "\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x05\x23\x01\x00\x00\x36\x8b\x84\x91\x23\x01\x00\x00\x41\x8d\x84\x39\x89\x67\x00\x00\x8d\x87\x89\x67\x00\x00\xb4\xc6\x66\xe9\xb8\x00\x00\x00\x67\xff\xa0\x23\x01\x00\x00\x66\xe8\xcb\x00\x00\x00\x74\xfc" |
#define | X86_CODE32 "\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x05\x23\x01\x00\x00\x36\x8b\x84\x91\x23\x01\x00\x00\x41\x8d\x84\x39\x89\x67\x00\x00\x8d\x87\x89\x67\x00\x00\xb4\xc6\xe9\xea\xbe\xad\xde\xff\xa0\x23\x01\x00\x00\xe8\xdf\xbe\xad\xde\x74\xff" |
Functions | |
static void | print_string_hex (const char *comment, unsigned char *str, size_t len) |
static const char * | get_eflag_name (uint64_t flag) |
static const char * | get_fpu_flag_name (uint64_t flag) |
static void | print_insn_detail (csh ud, cs_mode mode, cs_insn *ins) |
static void | test () |
int | main () |
Variables | |
static csh | handle |
#define X86_CODE16 "\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x05\x23\x01\x00\x00\x36\x8b\x84\x91\x23\x01\x00\x00\x41\x8d\x84\x39\x89\x67\x00\x00\x8d\x87\x89\x67\x00\x00\xb4\xc6\x66\xe9\xb8\x00\x00\x00\x67\xff\xa0\x23\x01\x00\x00\x66\xe8\xcb\x00\x00\x00\x74\xfc" |
#define X86_CODE32 "\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x05\x23\x01\x00\x00\x36\x8b\x84\x91\x23\x01\x00\x00\x41\x8d\x84\x39\x89\x67\x00\x00\x8d\x87\x89\x67\x00\x00\xb4\xc6\xe9\xea\xbe\xad\xde\xff\xa0\x23\x01\x00\x00\xe8\xdf\xbe\xad\xde\x74\xff" |
#define X86_CODE64 "\x55\x48\x8b\x05\xb8\x13\x00\x00\xe9\xea\xbe\xad\xde\xff\x25\x23\x01\x00\x00\xe8\xdf\xbe\xad\xde\x74\xff" |
Definition at line 34 of file test_x86.c.
References NULL, X86_EFLAGS_MODIFY_AF, X86_EFLAGS_MODIFY_CF, X86_EFLAGS_MODIFY_DF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_MODIFY_OF, X86_EFLAGS_MODIFY_PF, X86_EFLAGS_MODIFY_RF, X86_EFLAGS_MODIFY_SF, X86_EFLAGS_MODIFY_TF, X86_EFLAGS_MODIFY_ZF, X86_EFLAGS_PRIOR_AF, X86_EFLAGS_PRIOR_CF, X86_EFLAGS_PRIOR_DF, X86_EFLAGS_PRIOR_IF, X86_EFLAGS_PRIOR_NT, X86_EFLAGS_PRIOR_OF, X86_EFLAGS_PRIOR_PF, X86_EFLAGS_PRIOR_SF, X86_EFLAGS_PRIOR_TF, X86_EFLAGS_PRIOR_ZF, X86_EFLAGS_RESET_AF, X86_EFLAGS_RESET_CF, X86_EFLAGS_RESET_DF, X86_EFLAGS_RESET_IF, X86_EFLAGS_RESET_NT, X86_EFLAGS_RESET_OF, X86_EFLAGS_RESET_PF, X86_EFLAGS_RESET_SF, X86_EFLAGS_RESET_TF, X86_EFLAGS_SET_CF, X86_EFLAGS_SET_DF, X86_EFLAGS_SET_IF, X86_EFLAGS_TEST_CF, X86_EFLAGS_TEST_DF, X86_EFLAGS_TEST_NT, X86_EFLAGS_TEST_OF, X86_EFLAGS_TEST_PF, X86_EFLAGS_TEST_SF, X86_EFLAGS_TEST_ZF, X86_EFLAGS_UNDEFINED_AF, X86_EFLAGS_UNDEFINED_CF, X86_EFLAGS_UNDEFINED_OF, X86_EFLAGS_UNDEFINED_PF, X86_EFLAGS_UNDEFINED_SF, and X86_EFLAGS_UNDEFINED_ZF.
Referenced by print_insn_detail().
Definition at line 134 of file test_x86.c.
References NULL, X86_FPU_FLAGS_MODIFY_C0, X86_FPU_FLAGS_MODIFY_C1, X86_FPU_FLAGS_MODIFY_C2, X86_FPU_FLAGS_MODIFY_C3, X86_FPU_FLAGS_RESET_C0, X86_FPU_FLAGS_RESET_C1, X86_FPU_FLAGS_RESET_C2, X86_FPU_FLAGS_RESET_C3, X86_FPU_FLAGS_SET_C0, X86_FPU_FLAGS_SET_C1, X86_FPU_FLAGS_SET_C2, X86_FPU_FLAGS_SET_C3, X86_FPU_FLAGS_TEST_C0, X86_FPU_FLAGS_TEST_C1, X86_FPU_FLAGS_TEST_C2, X86_FPU_FLAGS_TEST_C3, X86_FPU_FLAGS_UNDEFINED_C0, X86_FPU_FLAGS_UNDEFINED_C1, X86_FPU_FLAGS_UNDEFINED_C2, and X86_FPU_FLAGS_UNDEFINED_C3.
Referenced by print_insn_detail().
int main | ( | void | ) |
Definition at line 459 of file test_x86.c.
References test().
Definition at line 182 of file test_x86.c.
References count, CS_AC_READ, CS_AC_WRITE, CS_MODE_16, cs_op_count(), cs_op_index(), cs_reg_name(), cs_regs_access(), get_eflag_name(), get_fpu_flag_name(), handle, i, NULL, print_string_hex(), printf(), PRIx64, X86_AVX_BCAST_INVALID, X86_AVX_CC_INVALID, X86_AVX_RM_INVALID, X86_GRP_FPU, X86_OP_IMM, X86_OP_MEM, X86_OP_REG, X86_REG_INVALID, X86_SSE_CC_INVALID, and X86_XOP_CC_INVALID.
Referenced by test().
Definition at line 22 of file test_x86.c.
References c, len, printf(), and cmd_descs_generate::str.
Referenced by print_insn_detail(), and test().
|
static |
Definition at line 372 of file test_x86.c.
References arch, platform::comment, count, CS_ARCH_X86, cs_close(), cs_disasm(), cs_free(), CS_MODE_16, CS_MODE_32, CS_MODE_64, cs_open(), CS_OPT_DETAIL, CS_OPT_ON, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT, cs_option(), err, handle, i, platform::opt_type, platform::opt_value, platforms, print_insn_detail(), print_string_hex(), printf(), PRIx64, X86_CODE16, X86_CODE32, and X86_CODE64.
Referenced by main().
|
static |
Definition at line 10 of file test_x86.c.
Referenced by print_insn_detail(), and test().