Go to the documentation of this file.
37 if (ins->detail == NULL)
40 sysz = &(ins->detail->sysz);
46 switch((
int)
op->type) {
53 printf(
"\t\toperands[%u].type: ACREG = %u\n",
i,
op->reg);
56 printf(
"\t\toperands[%u].type: IMM = 0x%" PRIx64
"\n",
i,
op->imm);
59 printf(
"\t\toperands[%u].type: MEM\n",
i);
61 printf(
"\t\t\toperands[%u].mem.base: REG = %s\n",
64 printf(
"\t\t\toperands[%u].mem.index: REG = %s\n",
66 if (
op->mem.length != 0)
67 printf(
"\t\t\toperands[%u].mem.length: 0x%" PRIx64
"\n",
i,
op->mem.length);
68 if (
op->mem.disp != 0)
69 printf(
"\t\t\toperands[%u].mem.disp: 0x%" PRIx64
"\n",
i,
op->mem.disp);
76 printf(
"\tCode condition: %u\n", sysz->
cc);
83 #define SYSZ_CODE "\xed\x00\x00\x00\x00\x1a\x5a\x0f\x1f\xff\xc2\x09\x80\x00\x00\x00\x07\xf7\xeb\x2a\xff\xff\x7f\x57\xe3\x01\xff\xff\x7f\x57\xeb\x00\xf0\x00\x00\x24\xb2\x4f\x00\x78\xec\x18\x00\x00\xc1\x7f"
103 printf(
"Failed on cs_open() with error returned: %u\n",
err);
113 printf(
"****************\n");
118 for (j = 0; j <
count; j++) {
119 printf(
"0x%" PRIx64
":\t%s\t%s\n", insn[j].address, insn[j].mnemonic, insn[j].op_str);
122 printf(
"0x%" PRIx64
":\n", insn[j-1].address + insn[j-1].
size);
127 printf(
"****************\n");
130 printf(
"ERROR: Failed to disasm given code!\n");
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(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)
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
static void print_insn_detail(cs_insn *ins)
cs_arch
Architecture type.
cs_sysz_op operands[6]
operands for this instruction.
@ SYSZ_OP_REG
= CS_OP_REG (Register operand).
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ SYSZ_OP_ACREG
Access register operand.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
@ CS_ARCH_SYSZ
SystemZ architecture.
const CAPSTONE_EXPORT char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
unsigned __int64 uint64_t
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
static void print_string_hex(const char *comment, unsigned char *str, size_t len)
@ CS_MODE_BIG_ENDIAN
big-endian mode
@ SYSZ_OP_MEM
= CS_OP_MEM (Memory operand).
@ SYSZ_OP_IMM
= CS_OP_IMM (Immediate operand).
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
struct platform platforms[]
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:32