Go to the documentation of this file.
3 #if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
4 #pragma warning(disable:4996) // disable MSVC's warning on strcpy()
5 #pragma warning(disable:28719) // disable MSVC's warning on strcpy()
7 #if defined(CAPSTONE_HAS_OSXKERNEL)
8 #include <Availability.h>
9 #include <libkern/libkern.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
39 #endif // defined(_KERNEL_MODE) && !defined(CAPSTONE_DIET)
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"
51 #else // No printing is available in diet mode
52 #define SKIPDATA_MNEM NULL
71 #ifdef CAPSTONE_HAS_ARM
76 #ifdef CAPSTONE_HAS_ARM64
81 #ifdef CAPSTONE_HAS_MIPS
86 #ifdef CAPSTONE_HAS_X86
91 #ifdef CAPSTONE_HAS_POWERPC
96 #ifdef CAPSTONE_HAS_SPARC
101 #ifdef CAPSTONE_HAS_SYSZ
106 #ifdef CAPSTONE_HAS_XCORE
111 #ifdef CAPSTONE_HAS_M68K
116 #ifdef CAPSTONE_HAS_TMS320C64X
121 #ifdef CAPSTONE_HAS_M680X
126 #ifdef CAPSTONE_HAS_EVM
131 #ifdef CAPSTONE_HAS_MOS65XX
140 #ifdef CAPSTONE_HAS_ARM
145 #ifdef CAPSTONE_HAS_ARM64
150 #ifdef CAPSTONE_HAS_MIPS
155 #ifdef CAPSTONE_HAS_X86
160 #ifdef CAPSTONE_HAS_POWERPC
165 #ifdef CAPSTONE_HAS_SPARC
170 #ifdef CAPSTONE_HAS_SYSZ
175 #ifdef CAPSTONE_HAS_XCORE
180 #ifdef CAPSTONE_HAS_M68K
185 #ifdef CAPSTONE_HAS_TMS320C64X
190 #ifdef CAPSTONE_HAS_M680X
195 #ifdef CAPSTONE_HAS_EVM
200 #ifdef CAPSTONE_HAS_MOS65XX
211 #ifdef CAPSTONE_HAS_ARM
217 #ifdef CAPSTONE_HAS_ARM64
222 #ifdef CAPSTONE_HAS_MIPS
228 #ifdef CAPSTONE_HAS_X86
233 #ifdef CAPSTONE_HAS_POWERPC
239 #ifdef CAPSTONE_HAS_SPARC
244 #ifdef CAPSTONE_HAS_SYSZ
249 #ifdef CAPSTONE_HAS_XCORE
254 #ifdef CAPSTONE_HAS_M68K
260 #ifdef CAPSTONE_HAS_TMS320C64X
265 #ifdef CAPSTONE_HAS_M680X
273 #ifdef CAPSTONE_HAS_EVM
278 #ifdef CAPSTONE_HAS_MOS65XX
287 #ifdef CAPSTONE_HAS_ARM
290 #ifdef CAPSTONE_HAS_ARM64
293 #ifdef CAPSTONE_HAS_MIPS
296 #ifdef CAPSTONE_HAS_X86
299 #ifdef CAPSTONE_HAS_POWERPC
302 #ifdef CAPSTONE_HAS_SPARC
305 #ifdef CAPSTONE_HAS_SYSZ
308 #ifdef CAPSTONE_HAS_XCORE
311 #ifdef CAPSTONE_HAS_M68K
314 #ifdef CAPSTONE_HAS_TMS320C64X
317 #ifdef CAPSTONE_HAS_M680X
320 #ifdef CAPSTONE_HAS_EVM
323 #ifdef CAPSTONE_HAS_MOS65XX
329 #if defined(CAPSTONE_USE_SYS_DYN_MEM)
330 #if !defined(CAPSTONE_HAS_OSXKERNEL) && !defined(_KERNEL_MODE)
336 #if defined(_WIN32_WCE)
340 #endif // defined(_WIN32_WCE)
342 #elif defined(_KERNEL_MODE)
351 extern void* kern_os_malloc(
size_t size);
352 extern void kern_os_free(
void*
addr);
353 extern void* kern_os_realloc(
void*
addr,
size_t nsize);
355 static void* cs_kern_os_calloc(
size_t num,
size_t size)
357 return kern_os_malloc(
num *
size);
365 #endif // !defined(CAPSTONE_HAS_OSXKERNEL) && !defined(_KERNEL_MODE)
374 #endif // defined(CAPSTONE_USE_SYS_DYN_MEM)
379 if (major != NULL && minor != NULL) {
411 #if defined(CAPSTONE_HAS_X86) && defined(CAPSTONE_X86_REDUCE)
439 return "Unknown error code";
441 return "OK (CS_ERR_OK)";
443 return "Out of memory (CS_ERR_MEM)";
445 return "Invalid/unsupported architecture(CS_ERR_ARCH)";
447 return "Invalid handle (CS_ERR_HANDLE)";
449 return "Invalid csh (CS_ERR_CSH)";
451 return "Invalid mode (CS_ERR_MODE)";
453 return "Invalid option (CS_ERR_OPTION)";
455 return "Details are unavailable (CS_ERR_DETAIL)";
457 return "Dynamic memory management uninitialized (CS_ERR_MEMSETUP)";
459 return "Different API version between core & binding (CS_ERR_VERSION)";
461 return "Information irrelevant in diet engine (CS_ERR_DIET)";
463 return "Information irrelevant for 'data' instruction in SKIPDATA mode (CS_ERR_SKIPDATA)";
465 return "AT&T syntax is unavailable (CS_ERR_X86_ATT)";
467 return "INTEL syntax is unavailable (CS_ERR_X86_INTEL)";
469 return "MASM syntax is unavailable (CS_ERR_X86_MASM)";
546 memset(ud, 0,
sizeof(*ud));
560 #ifndef CAPSTONE_DIET
563 uint16_t copy_size =
MIN(
sizeof(insn->bytes), insn->size);
567 memcpy(insn->bytes,
code + insn->size - copy_size, copy_size);
568 insn->size = copy_size;
578 #ifndef CAPSTONE_DIET
581 mnem = insn->mnemonic;
582 for (sp =
buffer; *sp; sp++) {
583 if (*sp ==
' '|| *sp ==
'\t')
612 for (; ((*sp ==
' ') || (*sp ==
'\t')); sp++);
613 strncpy(
insn->op_str, sp,
sizeof(
insn->op_str) - 1);
614 insn->op_str[
sizeof(
insn->op_str) - 1] =
'\0';
616 insn->op_str[0] =
'\0';
708 if (
handle->skipdata_size == 0) {
717 handle->skipdata_setup = *((cs_opt_skipdata *)
value);
730 if (
tmp->insn.id == opt->
id) {
732 (void)strncpy(
tmp->insn.mnemonic, opt->
mnemonic,
sizeof(
tmp->insn.mnemonic) - 1);
733 tmp->insn.mnemonic[
sizeof(
tmp->insn.mnemonic) - 1] =
'\0';
742 tmp->insn.id = opt->
id;
743 (void)strncpy(
tmp->insn.mnemonic, opt->
mnemonic,
sizeof(
tmp->insn.mnemonic) - 1);
744 tmp->insn.mnemonic[
sizeof(
tmp->insn.mnemonic) - 1] =
'\0';
758 if (
tmp->insn.id == opt->
id) {
788 #ifndef CAPSTONE_DIET
794 size_t available =
sizeof(((cs_insn*)NULL)->op_str);
810 if ((
size_t)
len > available - 1) {
831 size_t total_size = 0;
834 size_t skipdata_bytes;
854 #ifdef CAPSTONE_USE_SYS_DYN_MEM
864 total_size =
sizeof(cs_insn) * cache_size;
915 next_offset = insn_size;
929 if (
handle->skipdata_setup.callback) {
930 skipdata_bytes =
handle->skipdata_setup.callback(buffer_org, size_org,
931 (
size_t)(
offset - offset_org),
handle->skipdata_setup.user_data);
932 if (skipdata_bytes >
size)
940 skipdata_bytes =
handle->skipdata_size;
957 next_offset = skipdata_bytes;
969 if (
f == cache_size) {
971 cache_size = cache_size * 8 / 5;
972 total_size += (
sizeof(cs_insn) * cache_size);
1005 }
else if (
f != cache_size) {
1066 if (insn->detail == NULL) {
1072 insn->detail = NULL;
1104 #ifdef CAPSTONE_DIET
1130 *address += insn_size;
1132 size_t skipdata_bytes;
1139 if (
handle->skipdata_setup.callback) {
1141 0,
handle->skipdata_setup.user_data);
1142 if (skipdata_bytes > *
size)
1146 if (!skipdata_bytes)
1150 skipdata_bytes =
handle->skipdata_size;
1154 insn->address = *address;
1155 insn->size = (
uint16_t)skipdata_bytes;
1156 #ifdef CAPSTONE_DIET
1157 insn->mnemonic[0] =
'\0';
1158 insn->op_str[0] =
'\0';
1161 strncpy(insn->mnemonic,
handle->skipdata_setup.mnemonic,
1162 sizeof(insn->mnemonic) - 1);
1166 *
code += skipdata_bytes;
1167 *
size -= skipdata_bytes;
1168 *address += skipdata_bytes;
1184 return handle->reg_name(ud, reg);
1196 return handle->insn_name(ud, insn);
1230 if (!insn->detail) {
1235 return arr_exist8(insn->detail->groups, insn->detail->groups_count, group_id);
1257 if (!insn->detail) {
1262 return arr_exist(insn->detail->regs_read, insn->detail->regs_read_count, reg_id);
1284 if (!insn->detail) {
1289 return arr_exist(insn->detail->regs_write, insn->detail->regs_write_count, reg_id);
1296 unsigned int count = 0,
i;
1312 if (!insn->detail) {
1324 for (
i = 0;
i < insn->detail->arm.op_count;
i++)
1325 if (insn->detail->arm.operands[
i].type == (
arm_op_type)op_type)
1329 for (
i = 0;
i < insn->detail->arm64.op_count;
i++)
1330 if (insn->detail->arm64.operands[
i].type == (
arm64_op_type)op_type)
1334 for (
i = 0;
i < insn->detail->x86.op_count;
i++)
1335 if (insn->detail->x86.operands[
i].type == (
x86_op_type)op_type)
1339 for (
i = 0;
i < insn->detail->mips.op_count;
i++)
1340 if (insn->detail->mips.operands[
i].type == (
mips_op_type)op_type)
1344 for (
i = 0;
i < insn->detail->ppc.op_count;
i++)
1345 if (insn->detail->ppc.operands[
i].type == (
ppc_op_type)op_type)
1349 for (
i = 0;
i < insn->detail->sparc.op_count;
i++)
1350 if (insn->detail->sparc.operands[
i].type == (
sparc_op_type)op_type)
1354 for (
i = 0;
i < insn->detail->sysz.op_count;
i++)
1355 if (insn->detail->sysz.operands[
i].type == (
sysz_op_type)op_type)
1359 for (
i = 0;
i < insn->detail->xcore.op_count;
i++)
1360 if (insn->detail->xcore.operands[
i].type == (
xcore_op_type)op_type)
1364 for (
i = 0;
i < insn->detail->m68k.op_count;
i++)
1365 if (insn->detail->m68k.operands[
i].type == (
m68k_op_type)op_type)
1369 for (
i = 0;
i < insn->detail->tms320c64x.op_count;
i++)
1374 for (
i = 0;
i < insn->detail->m680x.op_count;
i++)
1375 if (insn->detail->m680x.operands[
i].type == (
m680x_op_type)op_type)
1380 for (
i = 0;
i < insn->detail->evm.op_count;
i++)
1381 if (insn->detail->evm.operands[
i].type == (evm_op_type)op_type)
1386 for (
i = 0;
i < insn->detail->mos65xx.op_count;
i++)
1400 unsigned int count = 0,
i;
1416 if (!insn->detail) {
1428 for (
i = 0;
i < insn->detail->arm.op_count;
i++) {
1429 if (insn->detail->arm.operands[
i].type == (
arm_op_type)op_type)
1436 for (
i = 0;
i < insn->detail->arm64.op_count;
i++) {
1437 if (insn->detail->arm64.operands[
i].type == (
arm64_op_type)op_type)
1444 for (
i = 0;
i < insn->detail->x86.op_count;
i++) {
1445 if (insn->detail->x86.operands[
i].type == (
x86_op_type)op_type)
1452 for (
i = 0;
i < insn->detail->mips.op_count;
i++) {
1453 if (insn->detail->mips.operands[
i].type == (
mips_op_type)op_type)
1460 for (
i = 0;
i < insn->detail->ppc.op_count;
i++) {
1461 if (insn->detail->ppc.operands[
i].type == (
ppc_op_type)op_type)
1468 for (
i = 0;
i < insn->detail->sparc.op_count;
i++) {
1469 if (insn->detail->sparc.operands[
i].type == (
sparc_op_type)op_type)
1476 for (
i = 0;
i < insn->detail->sysz.op_count;
i++) {
1477 if (insn->detail->sysz.operands[
i].type == (
sysz_op_type)op_type)
1484 for (
i = 0;
i < insn->detail->xcore.op_count;
i++) {
1485 if (insn->detail->xcore.operands[
i].type == (
xcore_op_type)op_type)
1492 for (
i = 0;
i < insn->detail->m68k.op_count;
i++) {
1493 if (insn->detail->m68k.operands[
i].type == (
m68k_op_type)op_type)
1500 for (
i = 0;
i < insn->detail->tms320c64x.op_count;
i++) {
1508 for (
i = 0;
i < insn->detail->m680x.op_count;
i++) {
1509 if (insn->detail->m680x.operands[
i].type == (
m680x_op_type)op_type)
1517 for (
i = 0;
i < insn->detail->evm.op_count;
i++) {
1518 if (insn->detail->evm.operands[
i].type == (evm_op_type)op_type)
1526 for (
i = 0;
i < insn->detail->mos65xx.op_count;
i++) {
1540 cs_regs regs_read,
uint8_t *regs_read_count,
1541 cs_regs regs_write,
uint8_t *regs_write_count)
1550 #ifdef CAPSTONE_DIET
1565 if (!insn->detail) {
1570 if (
handle->reg_access) {
1571 handle->reg_access(insn, regs_read, regs_read_count, regs_write, regs_write_count);
cs_err XCore_option(cs_struct *handle, cs_opt_type type, size_t value)
static cs_mode cs_arch_disallowed_mode_mask[MAX_ARCH]
struct insn_mnem * mnem_list
cs_opt_skipdata skipdata_setup
@ CS_MODE_MIPS2
Mips II ISA.
CAPSTONE_EXPORT int CAPSTONE_API cs_op_index(csh ud, const cs_insn *insn, unsigned int op_type, unsigned int post)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
cs_err AArch64_option(cs_struct *handle, cs_opt_type type, size_t value)
int __cdecl vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
cs_malloc_t cs_mem_malloc
@ CS_OPT_MEM
User-defined dynamic memory related functions.
bool arr_exist(uint16_t *arr, unsigned char max, unsigned int id)
cs_opt_type
Runtime option for the disassembled engine.
@ CS_MODE_32
32-bit mode (X86)
@ CS_MODE_M680X_6800
M680X Motorola 6800,6802 mode.
return memset(p, 0, total)
unsigned int id
ID of instruction to be customized.
@ CS_MODE_LITTLE_ENDIAN
little-endian mode (default mode)
static void post(QUEUE *q, enum uv__work_kind kind)
cs_err M680X_option(cs_struct *handle, cs_opt_type type, size_t value)
@ CS_MODE_M680X_6805
M680X Motorola/Freescale 6805 mode.
@ CS_ARCH_M68K
68K architecture
@ CS_ARCH_MOS65XX
MOS65XX architecture (including MOS6502)
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)
@ CS_MODE_M680X_CPU12
used on M68HC12/HCS12
@ CS_ARCH_PPC
PowerPC architecture.
char mnemonic[CS_MNEMONIC_SIZE]
@ CS_MODE_M680X_6801
M680X Motorola 6801,6803 mode.
@ CS_OPT_UNSIGNED
print immediate operands in unsigned form
void(* PostPrinter_t)(csh handle, cs_insn *, char *mnem, MCInst *mci)
arm_op_type
Operand type for instruction's operands.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
x86_op_type
Operand type for instruction's operands.
cs_arch
Architecture type.
cs_err EVM_option(cs_struct *handle, cs_opt_type type, size_t value)
unsigned short * insn_cache
CAPSTONE_EXPORT bool CAPSTONE_API cs_reg_write(csh ud, const cs_insn *insn, unsigned int reg_id)
void *(CAPSTONE_API * cs_realloc_t)(void *ptr, size_t size)
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ CS_MODE_M68K_060
M68K 68060 mode.
cs_err X86_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err MOS65XX_option(cs_struct *handle, cs_opt_type type, size_t value)
@ CS_OPT_OFF
Turn OFF an option - default for CS_OPT_DETAIL, CS_OPT_SKIPDATA, CS_OPT_UNSIGNED.
@ CS_MODE_M68K_000
M68K 68000 mode.
@ CS_MODE_16
16-bit mode (X86)
cs_err Mips_global_init(cs_struct *ud)
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)
cs_err Mips_option(cs_struct *handle, cs_opt_type type, size_t value)
@ CS_ARCH_EVM
Ethereum architecture.
@ CS_ARCH_M680X
680X architecture
void(CAPSTONE_API * cs_free_t)(void *ptr)
@ CS_ARCH_TMS320C64X
TMS320C64x architecture.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
@ CS_MODE_M68K_010
M68K 68010 mode.
@ CS_MODE_M680X_6808
M680X Motorola/Freescale/NXP 68HC08 mode.
struct customized_mnem insn
@ CS_MODE_MICRO
MicroMips mode (MIPS)
int CAPSTONE_API cs_winkernel_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
CAPSTONE_EXPORT int CAPSTONE_API cs_op_count(csh ud, const cs_insn *insn, unsigned int op_type)
#define CS_SUPPORT_X86_REDUCE
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
const CAPSTONE_EXPORT char *CAPSTONE_API cs_insn_name(csh ud, unsigned int insn)
cs_err XCore_global_init(cs_struct *ud)
static void skipdata_opstr(char *opstr, const uint8_t *buffer, size_t size)
m680x_op_type
Operand type for instruction's operands.
cs_err SystemZ_global_init(cs_struct *ud)
mos65xx_op_type
Operand type for instruction's operands.
cs_err TMS320C64x_global_init(cs_struct *ud)
static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCInst *mci, PostPrinter_t postprinter, const uint8_t *code)
cs_opt_value
Runtime option value (associated with option type above)
@ CS_ARCH_SYSZ
SystemZ architecture.
void *CAPSTONE_API cs_winkernel_calloc(size_t n, size_t size)
@ CS_MODE_QPX
Quad Processing eXtensions mode (PPC)
cs_err MOS65XX_global_init(cs_struct *ud)
const CAPSTONE_EXPORT char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
cs_err M68K_option(cs_struct *handle, cs_opt_type type, size_t value)
@ CS_ARCH_X86
X86 architecture (including x86 & x86-64)
unsigned __int64 uint64_t
int cs_snprintf(char *buffer, size_t size, const char *fmt,...)
cs_err AArch64_global_init(cs_struct *ud)
bool arr_exist8(unsigned char *arr, unsigned char max, unsigned int id)
const char * mnemonic
Customized instruction mnemonic.
CAPSTONE_EXPORT bool CAPSTONE_API cs_support(int query)
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
@ CS_MODE_M68K_020
M68K 68020 mode.
@ CS_MODE_M68K_040
M68K 68040 mode.
@ CS_MODE_THUMB
ARM's Thumb mode, including Thumb-2.
cs_vsnprintf_t cs_vsnprintf
cs_realloc_t cs_mem_realloc
unsigned MCInst_getOpcodePub(const MCInst *inst)
@ CS_MODE_BIG_ENDIAN
big-endian mode
_W64 unsigned int uintptr_t
@ CS_MODE_MIPS32R6
Mips32r6 ISA.
@ CS_OPT_SKIPDATA
Skip data when disassembling. Then engine is in SKIPDATA mode.
@ CS_MODE_M68K_030
M68K 68030 mode.
@ CS_MODE_MCLASS
ARM's Cortex-M series.
@ CS_MODE_M680X_6809
M680X Motorola 6809 mode.
static cs_err(* cs_arch_init[MAX_ARCH])(cs_struct *)
cs_err M68K_global_init(cs_struct *ud)
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)
@ CS_MODE_M680X_6309
M680X Hitachi 6309 mode.
cs_err EVM_global_init(cs_struct *ud)
@ CS_ARCH_SPARC
Sparc architecture.
sysz_op_type
Operand type for instruction's operands.
cs_err Sparc_global_init(cs_struct *ud)
@ CS_ARCH_MIPS
Mips architecture.
@ CS_MODE_M680X_HCS08
M680X Freescale/NXP HCS08 mode.
cs_err M680X_global_init(cs_struct *ud)
static cs_err(* cs_arch_option[MAX_ARCH])(cs_struct *, cs_opt_type, size_t value)
sparc_op_type
Operand type for instruction's operands.
ppc_op_type
Operand type for instruction's operands.
CAPSTONE_EXPORT bool CAPSTONE_API cs_disasm_iter(csh ud, const uint8_t **code, size_t *size, uint64_t *address, cs_insn *insn)
m68k_op_type
Operand type for instruction's operands.
@ CS_MODE_64
64-bit mode (X86, PPC)
const CAPSTONE_EXPORT char *CAPSTONE_API cs_strerror(cs_err code)
void *(CAPSTONE_API * cs_calloc_t)(size_t nmemb, size_t size)
@ CS_OPT_SKIPDATA_SETUP
Setup user-defined function for SKIPDATA option.
@ CS_ARCH_ARM
ARM architecture (including Thumb, Thumb-2)
cs_err PPC_option(cs_struct *handle, cs_opt_type type, size_t value)
void MCInst_Init(MCInst *inst)
const CAPSTONE_EXPORT char *CAPSTONE_API cs_group_name(csh ud, unsigned int group)
AllocList * next[kMaxLevel]
arm64_op_type
Operand type for instruction's operands.
void *(CAPSTONE_API * cs_malloc_t)(size_t size)
void *CAPSTONE_API cs_winkernel_malloc(size_t size)
cs_err Sparc_option(cs_struct *handle, cs_opt_type type, size_t value)
CAPSTONE_EXPORT cs_insn *CAPSTONE_API cs_malloc(csh ud)
xcore_op_type
Operand type for instruction's operands.
cs_err PPC_global_init(cs_struct *ud)
@ CS_MODE_MIPS3
Mips III ISA.
cs_err ARM_option(cs_struct *handle, cs_opt_type type, size_t value)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
@ CS_MODE_V9
SparcV9 mode (Sparc)
cs_err ARM_global_init(cs_struct *ud)
@ CS_MODE_M680X_6301
M680X Hitachi 6301,6303 mode.
cs_err X86_global_init(cs_struct *ud)
@ CS_OPT_MODE
Change engine's mode at run-time.
static uint8_t skipdata_size(cs_struct *handle)
@ CS_ARCH_ARM64
ARM-64, also called AArch64.
void SStream_Init(SStream *ss)
CAPSTONE_EXPORT bool CAPSTONE_API cs_insn_group(csh ud, const cs_insn *insn, unsigned int group_id)
cs_err TMS320C64x_option(cs_struct *handle, cs_opt_type type, size_t value)
mips_op_type
Operand type for instruction's operands.
void CAPSTONE_API cs_winkernel_free(void *ptr)
@ CS_MODE_M680X_6811
M680X Motorola/Freescale/NXP 68HC11 mode.
@ CS_ARCH_XCORE
XCore architecture.
void *CAPSTONE_API cs_winkernel_realloc(void *ptr, size_t size)
cs_err SystemZ_option(cs_struct *handle, cs_opt_type type, size_t value)
@ CS_MODE_V8
ARMv8 A32 encodings for ARM.
cs_calloc_t cs_mem_calloc
CAPSTONE_EXPORT unsigned int CAPSTONE_API cs_version(int *major, int *minor)
CAPSTONE_EXPORT bool CAPSTONE_API cs_reg_read(csh ud, const cs_insn *insn, unsigned int reg_id)
int(CAPSTONE_API * cs_vsnprintf_t)(char *str, size_t size, const char *format, va_list ap)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_errno(csh handle)
@ CS_OPT_MNEMONIC
Customize instruction mnemonic.
#define CAPSTONE_DEPRECATED
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:01