Definition at line 185 of file test_arm.c.
187 #define ARM_CODE "\x86\x48\x60\xf4\x4d\x0f\xe2\xf4\xED\xFF\xFF\xEB\x04\xe0\x2d\xe5\x00\x00\x00\x00\xe0\x83\x22\xe5\xf1\x02\x03\x0e\x00\x00\xa0\xe3\x02\x30\xc1\xe7\x00\x00\x53\xe3\x00\x02\x01\xf1\x05\x40\xd0\xe8\xf4\x80\x00\x00"
188 #define ARM_CODE2 "\xd1\xe8\x00\xf0\xf0\x24\x04\x07\x1f\x3c\xf2\xc0\x00\x00\x4f\xf0\x00\x01\x46\x6c"
189 #define THUMB_CODE "\x60\xf9\x1f\x04\xe0\xf9\x4f\x07\x70\x47\x00\xf0\x10\xe8\xeb\x46\x83\xb0\xc9\x68\x1f\xb1\x30\xbf\xaf\xf3\x20\x84\x52\xf8\x23\xf0"
190 #define THUMB_CODE2 "\x4f\xf0\x00\x01\xbd\xe8\x00\x88\xd1\xe8\x00\xf0\x18\xbf\xad\xbf\xf3\xff\x0b\x0c\x86\xf3\x00\x89\x80\xf3\x00\x8c\x4f\xfa\x99\xf6\xd0\xff\xa2\x01"
191 #define THUMB_MCLASS "\xef\xf3\x02\x80"
192 #define ARMV8 "\xe0\x3b\xb2\xee\x42\x00\x01\xe1\x51\xf0\x7f\xf5"
221 "Thumb-2 & register named with numbers",
234 (
unsigned char*)
ARMV8,
248 printf(
"Failed on cs_open() with error returned: %u\n",
err);
260 printf(
"****************\n");
265 for (j = 0; j <
count; j++) {
274 printf(
"****************\n");
277 printf(
"ERROR: Failed to disasm given code!\n");
@ CS_ARCH_ARM
ARM architecture (including Thumb, Thumb-2)
@ CS_MODE_MCLASS
ARM's Cortex-M series.
@ CS_MODE_V8
ARMv8 A32 encodings for ARM.
@ CS_MODE_THUMB
ARM's Thumb mode, including Thumb-2.
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ CS_OPT_SYNTAX
Assembly output syntax.
@ CS_OPT_SYNTAX_NOREGNAME
Prints register name with only number (CS_OPT_SYNTAX)
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
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 cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
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
struct platform platforms[]
static void print_string_hex(const char *comment, unsigned char *str, size_t len)
static void print_insn_detail(csh cs_handle, cs_insn *ins)
References arch, ARM_CODE, ARM_CODE2, ARMV8, platform::comment, count, CS_ARCH_ARM, cs_close(), cs_disasm(), cs_free(), CS_MODE_ARM, CS_MODE_MCLASS, CS_MODE_THUMB, CS_MODE_V8, cs_open(), CS_OPT_DETAIL, CS_OPT_ON, CS_OPT_SYNTAX, CS_OPT_SYNTAX_NOREGNAME, cs_option(), err, handle, i, platforms, print_insn_detail(), print_string_hex(), printf(), PRIx64, benchmark::syntax, THUMB_CODE, THUMB_CODE2, and THUMB_MCLASS.
Referenced by main().