#include <stdio.h>
#include <capstone/capstone.h>
Go to the source code of this file.
◆ print_insn_detail_xcore()
void print_insn_detail_xcore |
( |
csh |
handle, |
|
|
cs_insn * |
ins |
|
) |
| |
Definition at line 9 of file cstool_xcore.c.
15 if (ins->detail ==
NULL)
18 xcore = &(ins->detail->xcore);
22 for (
i = 0;
i <
xcore->op_count;
i++) {
24 switch((
int)
op->type) {
31 printf(
"\t\toperands[%u].type: IMM = 0x%x\n",
i,
op->imm);
34 printf(
"\t\toperands[%u].type: MEM\n",
i);
36 printf(
"\t\t\toperands[%u].mem.base: REG = %s\n",
39 printf(
"\t\t\toperands[%u].mem.index: REG = %s\n",
41 if (
op->mem.disp != 0)
42 printf(
"\t\t\toperands[%u].mem.disp: 0x%x\n",
i,
op->mem.disp);
43 if (
op->mem.direct != 1)
44 printf(
"\t\t\toperands[%u].mem.direct: -1\n",
i);
static mcore_handle handle
@ XCORE_OP_REG
= CS_OP_REG (Register operand).
@ XCORE_OP_IMM
= CS_OP_IMM (Immediate operand).
@ XCORE_OP_MEM
= CS_OP_MEM (Memory operand).
CAPSTONE_EXPORT const char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
References cs_reg_name(), handle, i, NULL, printf(), XCORE_OP_IMM, XCORE_OP_MEM, XCORE_OP_REG, and XCORE_REG_INVALID.
Referenced by print_details().
◆ print_string_hex()
void print_string_hex |
( |
char * |
comment, |
|
|
unsigned char * |
str, |
|
|
size_t |
len |
|
) |
| |