Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_analysis.h>
#include <capstone/capstone.h>
#include "arm_cs.h"
#include "arm_accessors32.h"
Go to the source code of this file.
Macros | |
#define | REG(x) rz_str_get_null(cs_reg_name(*handle, insn->detail->arm.operands[x].reg)) |
#define | MEMBASE(x) rz_str_get_null(cs_reg_name(*handle, insn->detail->arm.operands[x].mem.base)) |
#define | MEMINDEX(x) rz_str_get_null(cs_reg_name(*handle, insn->detail->arm.operands[x].mem.index)) |
#define | DECODE_SHIFT(x) decode_shift(insn->detail->arm.operands[x].shift.type) |
#define | REGSIZE32(x) regsize32(insn, x) |
#define | ARG(x) arg(a, handle, insn, str[x], x) |
#define | MATH32(opchar) arm32math(a, op, addr, buf, len, handle, insn, pcdelta, str, opchar, 0) |
#define | MATH32_NEG(opchar) arm32math(a, op, addr, buf, len, handle, insn, pcdelta, str, opchar, 1) |
#define | MATH32AS(opchar) arm32mathaddsub(a, op, addr, buf, len, handle, insn, pcdelta, str, opchar) |
Functions | |
static const char * | decode_shift (arm_shifter shift) |
static unsigned int | regsize32 (cs_insn *insn, int n) |
RZ_IPI const char * | rz_arm_cs_esil_prefix_cond (RzAnalysisOp *op, int cond_type) |
static const char * | arg (RzAnalysis *a, csh *handle, cs_insn *insn, char *buf, int n) |
static void | arm32math (RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn, int pcdelta, char(*str)[32], const char *opchar, int negate) |
static void | arm32mathaddsub (RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn, int pcdelta, char(*str)[32], const char *opchar) |
RZ_IPI int | rz_arm_cs_analysis_op_32_esil (RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn, bool thumb) |
#define DECODE_SHIFT | ( | x | ) | decode_shift(insn->detail->arm.operands[x].shift.type) |
Definition at line 46 of file arm_esil32.c.
Definition at line 174 of file arm_esil32.c.
#define MATH32_NEG | ( | opchar | ) | arm32math(a, op, addr, buf, len, handle, insn, pcdelta, str, opchar, 1) |
Definition at line 175 of file arm_esil32.c.
#define MATH32AS | ( | opchar | ) | arm32mathaddsub(a, op, addr, buf, len, handle, insn, pcdelta, str, opchar) |
Definition at line 176 of file arm_esil32.c.
#define MEMBASE | ( | x | ) | rz_str_get_null(cs_reg_name(*handle, insn->detail->arm.operands[x].mem.base)) |
Definition at line 11 of file arm_esil32.c.
#define MEMINDEX | ( | x | ) | rz_str_get_null(cs_reg_name(*handle, insn->detail->arm.operands[x].mem.index)) |
Definition at line 12 of file arm_esil32.c.
#define REG | ( | x | ) | rz_str_get_null(cs_reg_name(*handle, insn->detail->arm.operands[x].reg)) |
Definition at line 10 of file arm_esil32.c.
Definition at line 60 of file arm_esil32.c.
|
static |
Definition at line 136 of file arm_esil32.c.
References a, ARM_OP_FP, ARM_OP_IMM, ARM_OP_MEM, ARM_OP_REG, cs_reg_name(), DECODE_SHIFT, handle, ISSHIFTED, LSHIFT2, n, PFMT64d, rz_str_get_null(), sprintf, and ut64().
Referenced by __filterQuotedShell(), add_filter(), args_preprocessing(), avr_custom_des(), concat(), ds_print_esil_analysis(), fill_args(), fill_args_json(), foreach_pairs(), get_cd_from_arg(), get_hash_code(), main(), make_program_args(), parse_arg(), print_insn_vax(), rz_analysis_cc_set(), rz_analysis_extract_rarg(), rz_cmd_desc_get_arg(), rz_core_analysis_bytes(), rz_core_analysis_function_signature(), rz_core_print_func_args(), rz_str_format_msvc_argv(), rz_type_callable_arg_new(), rz_type_format_data_internal(), show_analinfo(), system_apply_env_var(), thumb_getshift(), uv__dlerror(), uv__thread_start(), and uv_thread_create_ex().
|
static |
Definition at line 178 of file arm_esil32.c.
References ARG, dest, ISSHIFTED, OPCOUNT, and rz_strbuf_appendf().
|
static |
Definition at line 216 of file arm_esil32.c.
References ARG, dst, OPCOUNT, rz_strbuf_appendf(), and src.
|
static |
Definition at line 14 of file arm_esil32.c.
References ARM_SFT_ASR, ARM_SFT_ASR_REG, ARM_SFT_LSL, ARM_SFT_LSL_REG, ARM_SFT_LSR, ARM_SFT_LSR_REG, ARM_SFT_ROR, ARM_SFT_ROR_REG, ARM_SFT_RRX, ARM_SFT_RRX_REG, and shift().
Definition at line 48 of file arm_esil32.c.
References ARM_REG_D0, ARM_REG_D31, ARM_REG_Q0, ARM_REG_Q15, n, reg, and rz_return_val_if_fail.
RZ_IPI int rz_arm_cs_analysis_op_32_esil | ( | RzAnalysis * | a, |
RzAnalysisOp * | op, | ||
ut64 | addr, | ||
const ut8 * | buf, | ||
int | len, | ||
csh * | handle, | ||
cs_insn * | insn, | ||
bool | thumb | ||
) |
Definition at line 239 of file arm_esil32.c.
References addr, ARG, ARM_INS_ADC, ARM_INS_ADD, ARM_INS_ADDW, ARM_INS_ADR, ARM_INS_AND, ARM_INS_ASR, ARM_INS_B, ARM_INS_BFC, ARM_INS_BFI, ARM_INS_BIC, ARM_INS_BKPT, ARM_INS_BL, ARM_INS_BLX, ARM_INS_BX, ARM_INS_BXJ, ARM_INS_CBNZ, ARM_INS_CBZ, ARM_INS_CLZ, ARM_INS_CMN, ARM_INS_CMP, ARM_INS_EOR, ARM_INS_IT, ARM_INS_LDM, ARM_INS_LDMDA, ARM_INS_LDMDB, ARM_INS_LDMIB, ARM_INS_LDR, ARM_INS_LDRB, ARM_INS_LDRBT, ARM_INS_LDRD, ARM_INS_LDREX, ARM_INS_LDREXB, ARM_INS_LDREXD, ARM_INS_LDREXH, ARM_INS_LDRH, ARM_INS_LDRHT, ARM_INS_LDRSB, ARM_INS_LDRSBT, ARM_INS_LDRSH, ARM_INS_LDRSHT, ARM_INS_LDRT, ARM_INS_LSL, ARM_INS_LSR, ARM_INS_MLA, ARM_INS_MLS, ARM_INS_MOV, ARM_INS_MOVT, ARM_INS_MOVW, ARM_INS_MRS, ARM_INS_MSR, ARM_INS_MUL, ARM_INS_MVN, ARM_INS_NOP, ARM_INS_ORN, ARM_INS_ORR, ARM_INS_POP, ARM_INS_PUSH, ARM_INS_REV, ARM_INS_REV16, ARM_INS_REVSH, ARM_INS_RSB, ARM_INS_SADD16, ARM_INS_SADD8, ARM_INS_SBC, ARM_INS_SMMLA, ARM_INS_SMMLAR, ARM_INS_SSUB16, ARM_INS_SSUB8, ARM_INS_STM, ARM_INS_STMDA, ARM_INS_STMDB, ARM_INS_STMIB, ARM_INS_STR, ARM_INS_STRB, ARM_INS_STRBT, ARM_INS_STRD, ARM_INS_STRH, ARM_INS_STRHT, ARM_INS_STRT, ARM_INS_SUB, ARM_INS_SUBW, ARM_INS_SVC, ARM_INS_SXTB, ARM_INS_SXTH, ARM_INS_TBB, ARM_INS_TBH, ARM_INS_TST, ARM_INS_UBFX, ARM_INS_UDF, ARM_INS_UMULL, ARM_INS_UXTB, ARM_INS_VLDMDB, ARM_INS_VLDMIA, ARM_INS_VMOV, ARM_INS_VSTMDB, ARM_INS_VSTMIA, ARM_REG_PC, ARM_SFT_ASR, ARM_SFT_LSL, ARM_SFT_LSR, ARM_SFT_ROR, ARM_SFT_RRX, HASMEMINDEX, i, IMM, ISIMM, ISMEM, ISMEMINDEXSUB, ISPOSTINDEX32, ISPREINDEX32, ISREG, ISSHIFTED, lr, LSHIFT2, mask, MATH32, MATH32_NEG, MATH32AS, MEMBASE, MEMDISP, MEMINDEX, NULL, OPCOUNT, pc, PFMT32u, PFMT64u, PFMT64x, r0, r1, r4, r5, r6, r7, REG, REGBASE, REGID, REGSIZE32, RZ_ANALYSIS_OP_FAMILY_THREAD, rz_arm_cs_esil_prefix_cond(), rz_num_bitmask(), rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_init(), rz_strbuf_set(), rz_strbuf_setf(), shift(), SHIFTTYPE, SHIFTVALUE, sp, cmd_descs_generate::str, UT16_MAX, UT32_MAX, ut64(), and width.
Referenced by analysis_op().
RZ_IPI const char* rz_arm_cs_esil_prefix_cond | ( | RzAnalysisOp * | op, |
int | cond_type | ||
) |
Definition at line 63 of file arm_esil32.c.
References ARM_CC_AL, ARM_CC_EQ, ARM_CC_GE, ARM_CC_GT, ARM_CC_HI, ARM_CC_HS, ARM_CC_LE, ARM_CC_LO, ARM_CC_LS, ARM_CC_LT, ARM_CC_MI, ARM_CC_NE, ARM_CC_PL, ARM_CC_VC, ARM_CC_VS, and rz_strbuf_setf().
Referenced by rz_arm_cs_analysis_op_32_esil(), and rz_arm_cs_analysis_op_64_esil().