3 #if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
4 #pragma warning(disable:4996)
5 #pragma warning(disable:28719)
7 #if defined(CAPSTONE_HAS_OSXKERNEL)
8 #include <Availability.h>
9 #include <libkern/libkern.h>
17 #include <capstone/capstone.h>
22 #if defined(_KERNEL_MODE)
23 #include "windows\winkernel_mm.h"
27 #if defined(_KERNEL_MODE) && !defined(CAPSTONE_DIET)
28 #if defined(CAPSTONE_HAS_ARM) || defined(CAPSTONE_HAS_ARM64) || defined(CAPSTONE_HAS_M68K)
29 #define CAPSTONE_STR_INTERNAL(x) #x
30 #define CAPSTONE_STR(x) CAPSTONE_STR_INTERNAL(x)
31 #define CAPSTONE_MSVC_WRANING_PREFIX __FILE__ "("CAPSTONE_STR(__LINE__)") : warning message : "
33 #pragma message(CAPSTONE_MSVC_WRANING_PREFIX "Windows driver does not support full features for selected architecture(s). Define CAPSTONE_DIET to compile Capstone with only supported features. See issue #681 for details.")
35 #undef CAPSTONE_MSVC_WRANING_PREFIX
37 #undef CAPSTONE_STR_INTERNAL
41 #if !defined(CAPSTONE_HAS_OSXKERNEL) && !defined(CAPSTONE_DIET) && !defined(_KERNEL_MODE)
42 #define INSN_CACHE_SIZE 32
45 #define INSN_CACHE_SIZE 8
50 #define SKIPDATA_MNEM ".byte"
52 #define SKIPDATA_MNEM NULL
70 #ifdef CAPSTONE_HAS_ARM
75 #ifdef CAPSTONE_HAS_ARM64
80 #ifdef CAPSTONE_HAS_MIPS
85 #ifdef CAPSTONE_HAS_X86
90 #ifdef CAPSTONE_HAS_POWERPC
95 #ifdef CAPSTONE_HAS_SPARC
100 #ifdef CAPSTONE_HAS_SYSZ
105 #ifdef CAPSTONE_HAS_XCORE
110 #ifdef CAPSTONE_HAS_M68K
115 #ifdef CAPSTONE_HAS_TMS320C64X
120 #ifdef CAPSTONE_HAS_M680X
125 #ifdef CAPSTONE_HAS_EVM
134 #ifdef CAPSTONE_HAS_ARM
139 #ifdef CAPSTONE_HAS_ARM64
144 #ifdef CAPSTONE_HAS_MIPS
149 #ifdef CAPSTONE_HAS_X86
154 #ifdef CAPSTONE_HAS_POWERPC
159 #ifdef CAPSTONE_HAS_SPARC
164 #ifdef CAPSTONE_HAS_SYSZ
169 #ifdef CAPSTONE_HAS_XCORE
174 #ifdef CAPSTONE_HAS_M68K
179 #ifdef CAPSTONE_HAS_TMS320C64X
184 #ifdef CAPSTONE_HAS_M680X
189 #ifdef CAPSTONE_HAS_EVM
199 #ifdef CAPSTONE_HAS_ARM
205 #ifdef CAPSTONE_HAS_ARM64
210 #ifdef CAPSTONE_HAS_MIPS
216 #ifdef CAPSTONE_HAS_X86
221 #ifdef CAPSTONE_HAS_POWERPC
227 #ifdef CAPSTONE_HAS_SPARC
232 #ifdef CAPSTONE_HAS_SYSZ
237 #ifdef CAPSTONE_HAS_XCORE
242 #ifdef CAPSTONE_HAS_M68K
253 #ifdef CAPSTONE_HAS_M680X
261 #ifdef CAPSTONE_HAS_EVM
270 #ifdef CAPSTONE_HAS_ARM
273 #ifdef CAPSTONE_HAS_ARM64
276 #ifdef CAPSTONE_HAS_MIPS
279 #ifdef CAPSTONE_HAS_X86
282 #ifdef CAPSTONE_HAS_POWERPC
285 #ifdef CAPSTONE_HAS_SPARC
288 #ifdef CAPSTONE_HAS_SYSZ
291 #ifdef CAPSTONE_HAS_XCORE
294 #ifdef CAPSTONE_HAS_M68K
300 #ifdef CAPSTONE_HAS_M680X
303 #ifdef CAPSTONE_HAS_EVM
309 #if defined(CAPSTONE_USE_SYS_DYN_MEM)
310 #if !defined(CAPSTONE_HAS_OSXKERNEL) && !defined(_KERNEL_MODE)
316 #if defined(_WIN32_WCE)
322 #elif defined(_KERNEL_MODE)
331 extern void* kern_os_malloc(
size_t size);
332 extern void kern_os_free(
void*
addr);
333 extern void* kern_os_realloc(
void*
addr,
size_t nsize);
335 static void* cs_kern_os_calloc(
size_t num,
size_t size)
337 return kern_os_malloc(
num *
size);
390 #if defined(CAPSTONE_HAS_X86) && defined(CAPSTONE_X86_REDUCE)
418 return "Unknown error code";
420 return "OK (CS_ERR_OK)";
422 return "Out of memory (CS_ERR_MEM)";
424 return "Invalid/unsupported architecture(CS_ERR_ARCH)";
426 return "Invalid handle (CS_ERR_HANDLE)";
428 return "Invalid csh (CS_ERR_CSH)";
430 return "Invalid mode (CS_ERR_MODE)";
432 return "Invalid option (CS_ERR_OPTION)";
434 return "Details are unavailable (CS_ERR_DETAIL)";
436 return "Dynamic memory management uninitialized (CS_ERR_MEMSETUP)";
438 return "Different API version between core & binding (CS_ERR_VERSION)";
440 return "Information irrelevant in diet engine (CS_ERR_DIET)";
442 return "Information irrelevant for 'data' instruction in SKIPDATA mode (CS_ERR_SKIPDATA)";
444 return "AT&T syntax is unavailable (CS_ERR_X86_ATT)";
446 return "INTEL syntax is unavailable (CS_ERR_X86_INTEL)";
448 return "MASM syntax is unavailable (CS_ERR_X86_MASM)";
525 memset(ud, 0,
sizeof(*ud));
539 #ifndef CAPSTONE_DIET
542 uint16_t copy_size =
MIN(
sizeof(insn->bytes), insn->size);
546 memcpy(insn->bytes,
code + insn->size - copy_size, copy_size);
547 insn->size = copy_size;
557 #ifndef CAPSTONE_DIET
560 mnem = insn->mnemonic;
562 if (*
sp ==
' '|| *
sp ==
'\t')
591 for (; ((*
sp ==
' ') || (*
sp ==
'\t'));
sp++);
592 strncpy(
insn->op_str,
sp,
sizeof(
insn->op_str) - 1);
593 insn->op_str[
sizeof(
insn->op_str) - 1] =
'\0';
595 insn->op_str[0] =
'\0';
684 if (
handle->skipdata_size == 0) {
693 handle->skipdata_setup = *((cs_opt_skipdata *)
value);
706 if (
tmp->insn.id == opt->
id) {
708 (void)strncpy(
tmp->insn.mnemonic, opt->
mnemonic,
sizeof(
tmp->insn.mnemonic) - 1);
709 tmp->insn.mnemonic[
sizeof(
tmp->insn.mnemonic) - 1] =
'\0';
718 tmp->insn.id = opt->
id;
719 (void)strncpy(
tmp->insn.mnemonic, opt->
mnemonic,
sizeof(
tmp->insn.mnemonic) - 1);
720 tmp->insn.mnemonic[
sizeof(
tmp->insn.mnemonic) - 1] =
'\0';
734 if (
tmp->insn.id == opt->
id) {
764 #ifndef CAPSTONE_DIET
770 size_t available =
sizeof(((cs_insn*)
NULL)->op_str);
786 if ((
size_t)
len > available - 1) {
807 size_t total_size = 0;
810 size_t skipdata_bytes;
830 #ifdef CAPSTONE_USE_SYS_DYN_MEM
840 total_size =
sizeof(cs_insn) * cache_size;
891 next_offset = insn_size;
905 if (
handle->skipdata_setup.callback) {
906 skipdata_bytes =
handle->skipdata_setup.callback(buffer_org, size_org,
907 (
size_t)(
offset - offset_org),
handle->skipdata_setup.user_data);
908 if (skipdata_bytes >
size)
916 skipdata_bytes =
handle->skipdata_size;
933 next_offset = skipdata_bytes;
945 if (
f == cache_size) {
947 cache_size = cache_size * 8 / 5;
948 total_size += (
sizeof(cs_insn) * cache_size);
949 unsigned int old_size = total_size;
964 memset((
char *)total + (
sizeof(cs_insn) * old_size), 0, (total_size - old_size));
967 insn_cache = (cs_insn *)((
char *)total +
sizeof(cs_insn) *
c);
983 }
else if (
f != cache_size) {
1044 if (insn->detail ==
NULL) {
1050 insn->detail =
NULL;
1082 #ifdef CAPSTONE_DIET
1108 *address += insn_size;
1110 size_t skipdata_bytes;
1117 if (
handle->skipdata_setup.callback) {
1119 0,
handle->skipdata_setup.user_data);
1120 if (skipdata_bytes > *
size)
1124 if (!skipdata_bytes)
1128 skipdata_bytes =
handle->skipdata_size;
1132 insn->address = *address;
1133 insn->size = (
uint16_t)skipdata_bytes;
1134 #ifdef CAPSTONE_DIET
1135 insn->mnemonic[0] =
'\0';
1136 insn->op_str[0] =
'\0';
1139 strncpy(insn->mnemonic,
handle->skipdata_setup.mnemonic,
1140 sizeof(insn->mnemonic) - 1);
1144 *
code += skipdata_bytes;
1145 *
size -= skipdata_bytes;
1146 *address += skipdata_bytes;
1174 return handle->insn_name(ud, insn);
1186 return handle->group_name(ud, group);
1208 if (!insn->detail) {
1213 return arr_exist8(insn->detail->groups, insn->detail->groups_count, group_id);
1235 if (!insn->detail) {
1240 return arr_exist(insn->detail->regs_read, insn->detail->regs_read_count, reg_id);
1262 if (!insn->detail) {
1267 return arr_exist(insn->detail->regs_write, insn->detail->regs_write_count, reg_id);
1274 unsigned int count = 0,
i;
1290 if (!insn->detail) {
1302 for (
i = 0;
i < insn->detail->arm.op_count;
i++)
1303 if (insn->detail->arm.operands[
i].type == (
arm_op_type)op_type)
1307 for (
i = 0;
i < insn->detail->arm64.op_count;
i++)
1308 if (insn->detail->arm64.operands[
i].type == (
arm64_op_type)op_type)
1312 for (
i = 0;
i < insn->detail->x86.op_count;
i++)
1313 if (insn->detail->x86.operands[
i].type == (
x86_op_type)op_type)
1317 for (
i = 0;
i < insn->detail->mips.op_count;
i++)
1318 if (insn->detail->mips.operands[
i].type == (
mips_op_type)op_type)
1322 for (
i = 0;
i < insn->detail->ppc.op_count;
i++)
1323 if (insn->detail->ppc.operands[
i].type == (
ppc_op_type)op_type)
1327 for (
i = 0;
i < insn->detail->sparc.op_count;
i++)
1328 if (insn->detail->sparc.operands[
i].type == (
sparc_op_type)op_type)
1332 for (
i = 0;
i < insn->detail->sysz.op_count;
i++)
1333 if (insn->detail->sysz.operands[
i].type == (
sysz_op_type)op_type)
1337 for (
i = 0;
i < insn->detail->xcore.op_count;
i++)
1338 if (insn->detail->xcore.operands[
i].type == (
xcore_op_type)op_type)
1342 for (
i = 0;
i < insn->detail->m68k.op_count;
i++)
1343 if (insn->detail->m68k.operands[
i].type == (
m68k_op_type)op_type)
1347 for (
i = 0;
i < insn->detail->tms320c64x.op_count;
i++)
1352 for (
i = 0;
i < insn->detail->m680x.op_count;
i++)
1353 if (insn->detail->m680x.operands[
i].type == (
m680x_op_type)op_type)
1358 for (
i = 0;
i < insn->detail->evm.op_count;
i++)
1359 if (insn->detail->evm.operands[
i].type == (evm_op_type)op_type)
1373 unsigned int count = 0,
i;
1389 if (!insn->detail) {
1401 for (
i = 0;
i < insn->detail->arm.op_count;
i++) {
1402 if (insn->detail->arm.operands[
i].type == (
arm_op_type)op_type)
1409 for (
i = 0;
i < insn->detail->arm64.op_count;
i++) {
1410 if (insn->detail->arm64.operands[
i].type == (
arm64_op_type)op_type)
1417 for (
i = 0;
i < insn->detail->x86.op_count;
i++) {
1418 if (insn->detail->x86.operands[
i].type == (
x86_op_type)op_type)
1425 for (
i = 0;
i < insn->detail->mips.op_count;
i++) {
1426 if (insn->detail->mips.operands[
i].type == (
mips_op_type)op_type)
1433 for (
i = 0;
i < insn->detail->ppc.op_count;
i++) {
1434 if (insn->detail->ppc.operands[
i].type == (
ppc_op_type)op_type)
1441 for (
i = 0;
i < insn->detail->sparc.op_count;
i++) {
1442 if (insn->detail->sparc.operands[
i].type == (
sparc_op_type)op_type)
1449 for (
i = 0;
i < insn->detail->sysz.op_count;
i++) {
1450 if (insn->detail->sysz.operands[
i].type == (
sysz_op_type)op_type)
1457 for (
i = 0;
i < insn->detail->xcore.op_count;
i++) {
1458 if (insn->detail->xcore.operands[
i].type == (
xcore_op_type)op_type)
1465 for (
i = 0;
i < insn->detail->m68k.op_count;
i++) {
1466 if (insn->detail->m68k.operands[
i].type == (
m68k_op_type)op_type)
1473 for (
i = 0;
i < insn->detail->tms320c64x.op_count;
i++) {
1481 for (
i = 0;
i < insn->detail->m680x.op_count;
i++) {
1482 if (insn->detail->m680x.operands[
i].type == (
m680x_op_type)op_type)
1490 for (
i = 0;
i < insn->detail->evm.op_count;
i++) {
1491 if (insn->detail->evm.operands[
i].type == (evm_op_type)op_type)
1505 cs_regs regs_read,
uint8_t *regs_read_count,
1506 cs_regs regs_write,
uint8_t *regs_write_count)
1515 #ifdef CAPSTONE_DIET
1530 if (!insn->detail) {
1535 if (
handle->reg_access) {
1536 handle->reg_access(insn, regs_read, regs_read_count, regs_write, regs_write_count);
cs_err AArch64_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err AArch64_global_init(cs_struct *ud)
cs_err ARM_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err ARM_global_init(cs_struct *ud)
cs_err EVM_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err EVM_global_init(cs_struct *ud)
cs_err M680X_global_init(cs_struct *ud)
cs_err M680X_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err M68K_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err M68K_global_init(cs_struct *ud)
unsigned MCInst_getOpcodePub(const MCInst *inst)
void MCInst_Init(MCInst *inst)
cs_err Mips_global_init(cs_struct *ud)
cs_err Mips_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err PPC_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err PPC_global_init(cs_struct *ud)
void SStream_Init(SStream *ss)
cs_err Sparc_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err Sparc_global_init(cs_struct *ud)
cs_err SystemZ_global_init(cs_struct *ud)
cs_err SystemZ_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err TMS320C64x_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err TMS320C64x_global_init(cs_struct *ud)
cs_err X86_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err X86_global_init(cs_struct *ud)
cs_err XCore_global_init(cs_struct *ud)
cs_err XCore_option(cs_struct *handle, cs_opt_type type, size_t value)
#define CAPSTONE_HAS_TMS320C64X
static mcore_handle handle
static int opstr(RzAsm *a, ut8 *data, const Opcode *op)
arm64_op_type
Operand type for instruction's operands.
arm_op_type
Operand type for instruction's operands.
cs_arch
Architecture type.
@ CS_ARCH_ARM64
ARM-64, also called AArch64.
@ CS_ARCH_SPARC
Sparc architecture.
@ CS_ARCH_XCORE
XCore architecture.
@ CS_ARCH_M68K
68K architecture
@ CS_ARCH_X86
X86 architecture (including x86 & x86-64)
@ CS_ARCH_M680X
680X architecture
@ CS_ARCH_ARM
ARM architecture (including Thumb, Thumb-2)
@ CS_ARCH_MIPS
Mips architecture.
@ CS_ARCH_SYSZ
SystemZ architecture.
@ CS_ARCH_TMS320C64X
TMS320C64x architecture.
@ CS_ARCH_EVM
Ethereum architecture.
@ CS_ARCH_PPC
PowerPC architecture.
#define CS_SUPPORT_X86_REDUCE
@ CS_MODE_M680X_6811
M680X Motorola/Freescale/NXP 68HC11 mode.
@ CS_MODE_M680X_6805
M680X Motorola/Freescale 6805 mode.
@ CS_MODE_MCLASS
ARM's Cortex-M series.
@ CS_MODE_M680X_HCS08
M680X Freescale/NXP HCS08 mode.
@ CS_MODE_64
64-bit mode (X86, PPC)
@ CS_MODE_M68K_040
M68K 68040 mode.
@ CS_MODE_M680X_6309
M680X Hitachi 6309 mode.
@ CS_MODE_M68K_000
M68K 68000 mode.
@ CS_MODE_32
32-bit mode (X86)
@ CS_MODE_V8
ARMv8 A32 encodings for ARM.
@ CS_MODE_MICRO
MicroMips mode (MIPS)
@ CS_MODE_M680X_CPU12
used on M68HC12/HCS12
@ CS_MODE_M68K_060
M68K 68060 mode.
@ CS_MODE_MIPS3
Mips III ISA.
@ CS_MODE_M68K_010
M68K 68010 mode.
@ CS_MODE_M680X_6301
M680X Hitachi 6301,6303 mode.
@ CS_MODE_MIPS32R6
Mips32r6 ISA.
@ CS_MODE_M680X_6801
M680X Motorola 6801,6803 mode.
@ CS_MODE_BIG_ENDIAN
big-endian mode
@ CS_MODE_16
16-bit mode (X86)
@ CS_MODE_V9
SparcV9 mode (Sparc)
@ CS_MODE_M68K_020
M68K 68020 mode.
@ CS_MODE_THUMB
ARM's Thumb mode, including Thumb-2.
@ CS_MODE_M680X_6800
M680X Motorola 6800,6802 mode.
@ CS_MODE_M68K_030
M68K 68030 mode.
@ CS_MODE_M680X_6808
M680X Motorola/Freescale/NXP 68HC08 mode.
@ CS_MODE_QPX
Quad Processing eXtensions mode (PPC)
@ CS_MODE_LITTLE_ENDIAN
little-endian mode (default mode)
@ CS_MODE_MIPS2
Mips II ISA.
@ CS_MODE_M680X_6809
M680X Motorola 6809 mode.
cs_opt_type
Runtime option for the disassembled engine.
@ CS_OPT_SKIPDATA_SETUP
Setup user-defined function for SKIPDATA option.
@ CS_OPT_UNSIGNED
print immediate operands in unsigned form
@ CS_OPT_MEM
User-defined dynamic memory related functions.
@ CS_OPT_MODE
Change engine's mode at run-time.
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ CS_OPT_SKIPDATA
Skip data when disassembling. Then engine is in SKIPDATA mode.
@ CS_OPT_MNEMONIC
Customize instruction mnemonic.
void(CAPSTONE_API * cs_free_t)(void *ptr)
cs_opt_value
Runtime option value (associated with option type above)
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
@ CS_OPT_OFF
Turn OFF an option - default for CS_OPT_DETAIL, CS_OPT_SKIPDATA, CS_OPT_UNSIGNED.
void *(CAPSTONE_API * cs_malloc_t)(size_t size)
void *(CAPSTONE_API * cs_calloc_t)(size_t nmemb, size_t size)
int(CAPSTONE_API * cs_vsnprintf_t)(char *str, size_t size, const char *format, va_list ap)
#define CAPSTONE_DEPRECATED
void *(CAPSTONE_API * cs_realloc_t)(void *ptr, size_t size)
sysz_op_type
Operand type for instruction's operands.
x86_op_type
Operand type for instruction's operands.
xcore_op_type
Operand type for instruction's operands.
cs_malloc_t cs_mem_malloc
CAPSTONE_EXPORT unsigned int CAPSTONE_API cs_version(int *major, int *minor)
CAPSTONE_EXPORT bool CAPSTONE_API cs_support(int query)
cs_realloc_t cs_mem_realloc
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_regs_access(csh ud, const cs_insn *insn, cs_regs regs_read, uint8_t *regs_read_count, cs_regs regs_write, uint8_t *regs_write_count)
static cs_mode cs_arch_disallowed_mode_mask[MAX_ARCH]
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_errno(csh handle)
CAPSTONE_EXPORT size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64_t offset, size_t count, cs_insn **insn)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_group_name(csh ud, unsigned int group)
static void skipdata_opstr(char *opstr, const uint8_t *buffer, size_t size)
cs_vsnprintf_t cs_vsnprintf
CAPSTONE_EXPORT bool CAPSTONE_API cs_reg_read(csh ud, const cs_insn *insn, unsigned int reg_id)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_strerror(cs_err code)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
static cs_err(* cs_arch_init[MAX_ARCH])(cs_struct *)
cs_calloc_t cs_mem_calloc
CAPSTONE_EXPORT bool CAPSTONE_API cs_insn_group(csh ud, const cs_insn *insn, unsigned int group_id)
CAPSTONE_EXPORT int CAPSTONE_API cs_op_count(csh ud, const cs_insn *insn, unsigned int op_type)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_insn_name(csh ud, unsigned int insn)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
static cs_err(* cs_arch_option[MAX_ARCH])(cs_struct *, cs_opt_type, size_t value)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
CAPSTONE_EXPORT bool CAPSTONE_API cs_reg_write(csh ud, const cs_insn *insn, unsigned int reg_id)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCInst *mci, PostPrinter_t postprinter, const uint8_t *code)
CAPSTONE_EXPORT int CAPSTONE_API cs_op_index(csh ud, const cs_insn *insn, unsigned int op_type, unsigned int post)
static uint8_t skipdata_size(cs_struct *handle)
CAPSTONE_EXPORT cs_insn *CAPSTONE_API cs_malloc(csh ud)
CAPSTONE_EXPORT bool CAPSTONE_API cs_disasm_iter(csh ud, const uint8_t **code, size_t *size, uint64_t *address, cs_insn *insn)
CAPSTONE_EXPORT CAPSTONE_DEPRECATED size_t CAPSTONE_API cs_disasm_ex(csh ud, const uint8_t *buffer, size_t size, uint64_t offset, size_t count, cs_insn **insn)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
void(* PostPrinter_t)(csh handle, cs_insn *, char *mnem, MCInst *mci)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * realloc(void *ptr, size_t size)
void * malloc(size_t size)
void * calloc(size_t number, size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
m680x_op_type
Operand type for instruction's operands.
m68k_op_type
Operand type for instruction's operands.
_W64 unsigned int uintptr_t
const char * mnemonic
Customized instruction mnemonic.
unsigned int id
ID of instruction to be customized.
unsigned short * insn_cache
struct insn_mnem * mnem_list
cs_opt_skipdata skipdata_setup
char mnemonic[CS_MNEMONIC_SIZE]
struct customized_mnem insn
mips_op_type
Operand type for instruction's operands.
ppc_op_type
Operand type for instruction's operands.
sparc_op_type
Operand type for instruction's operands.
int cs_snprintf(char *buffer, size_t size, const char *fmt,...)
bool arr_exist8(unsigned char *arr, unsigned char max, unsigned int id)
bool arr_exist(uint16_t *arr, unsigned char max, unsigned int id)
static void post(QUEUE *q, enum uv__work_kind kind)
void *CAPSTONE_API cs_winkernel_realloc(void *ptr, size_t size)
int CAPSTONE_API cs_winkernel_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
void CAPSTONE_API cs_winkernel_free(void *ptr)
void *CAPSTONE_API cs_winkernel_calloc(size_t n, size_t size)
void *CAPSTONE_API cs_winkernel_malloc(size_t size)