10 #define FLG(x) RZ_ANALYSIS_ESIL_FLAG_##x
11 #define cpuflag(x, y) \
14 RZ_BIT_SET(&esil->flags, FLG(x)); \
16 RZ_BIT_UNSET(&esil->flags, FLG(x)); \
32 #define ESIL_LOG(fmtstr, ...) \
33 if (esil->verbose) { \
34 RZ_LOG_WARN(fmtstr, ##__VA_ARGS__); \
94 if (!(esil->
stack =
calloc(
sizeof(
char *), stacksize))) {
119 if (!ht_pp_insert(esil->
ops,
op, eop)) {
135 if (esil->
cmd(esil, esil->
cmd_trap, trap_type, trap_code)) {
142 if (ap->
esil_trap(esil, trap_type, trap_code)) {
150 return icb (esil, trap_type, trap_code);
170 ht_pp_free(esil->
ops);
197 return ri ? ri->
size : 0;
202 return !(dataAlign > 0 &&
addr % dataAlign);
390 RZ_LOG_WARN(
"RzReg profile does not contain PC register\n");
394 RZ_LOG_WARN(
"RzReg profile does not contain SP register\n");
398 RZ_LOG_WARN(
"RzReg profile does not contain BP register\n");
401 if (
reg &&
reg->name && ((strcmp(
reg->name,
pc) && strcmp(
reg->name,
sp) && strcmp(
reg->name, bp)) ||
num)) {
436 if (!strncmp(
str,
"0x", 2)) {
442 for (
i = 1;
i <
len;
i++) {
564 m = 1ULL << (
dst - 1);
649 const ut64 c1 = 0x0101010101010101ULL;
650 const ut64 c2 = 0x8040201008040201ULL;
681 const ut64 result = ((esil->
cur &
m[0]) < (esil->
old &
m[0])) ^ ((esil->
cur &
m[1]) < (esil->
old &
m[1]));
793 ESIL_LOG(
"esil_eq: invalid parameters\n");
819 ESIL_LOG(
"esil_neg: empty stack\n");
834 ESIL_LOG(
"esil_negeq: empty stack\n");
858 ESIL_LOG(
"esil_andeq: empty stack\n");
878 ESIL_LOG(
"esil_ordeq: empty stack\n");
898 ESIL_LOG(
"esil_xoreq: empty stack\n");
928 #define r(x) rz_reg_getv(esil->analysis->reg, "##x##")
930 #define rs(x, y) rz_reg_setv(esil->analysis->reg, "##x##", y)
969 ESIL_LOG(
"esil_trap: missing parameters in stack\n");
981 ESIL_LOG(
"esil_bits: missing parameters in stack\n");
987 if (
popRN(esil, &interrupt)) {
1021 CF - carry flag -- Set on high-order
bit carry or borrow; cleared otherwise
1025 Set
if low-order eight
bits of result contain an even number of
"1" bits; cleared otherwise
1027 Set
if result is zero; cleared otherwise
1030 Set equal
to high-order
bit of result (0
if positive 1
if negative)
1033 if (
a>0&&
b>0 && (
a+
b)<0)
1034 Set
if result is too
large a positive number or too small
a negative number (excluding sign
bit)
to fit
in destination
operand; cleared otherwise
1036 JBE: CF = 1 || ZF = 1
1104 if (num2 >
sizeof(
ut64) * 8) {
1105 ESIL_LOG(
"esil_lsl: shift is too big\n");
1115 ESIL_LOG(
"esil_lsl: empty stack\n");
1130 if (num2 >
sizeof(
ut64) * 8) {
1131 ESIL_LOG(
"esil_lsleq: shift is too big\n");
1145 ESIL_LOG(
"esil_lsleq: empty stack\n");
1164 ESIL_LOG(
"esil_lsr: empty stack\n");
1190 ESIL_LOG(
"esil_lsreq: empty stack\n");
1201 ut64 op_num, param_num;
1209 if (regsize == 32) {
1210 isNegative = ((
st32)op_num) < 0;
1214 isNegative = ((
st64)op_num) < 0;
1217 if (regsize == 32) {
1218 op_num = -(
st64)op_num;
1219 if (op_num >> param_num) {
1220 op_num >>= param_num;
1221 op_num = -(
st64)op_num;
1229 int shift = regsize - 1;
1230 if (shift < 0 || shift > regsize - 1) {
1234 if (param_num > regsize - 1) {
1242 }
else if (op_num & (1LL <<
shift)) {
1243 left_bits = (1 << param_num) - 1;
1244 left_bits <<= regsize - param_num;
1246 op_num = left_bits | (op_num >> param_num);
1249 op_num >>= param_num;
1258 ESIL_LOG(
"esil_asr: empty stack\n");
1269 ut64 op_num = 0, param_num = 0;
1274 if (param_num > regsize - 1) {
1280 if (regsize == 32) {
1281 isNegative = ((
st32)op_num) < 0;
1285 isNegative = ((
st64)op_num) < 0;
1291 if (op_num & (1ULL << (regsize - 1))) {
1292 left_bits = (1ULL << param_num) - 1;
1293 left_bits <<= regsize - param_num;
1295 op_num = left_bits | (op_num >> param_num);
1297 op_num >>= param_num;
1303 ESIL_LOG(
"esil_asr: empty stack\n");
1325 ESIL_LOG(
"esil_ror: empty stack\n");
1347 ESIL_LOG(
"esil_rol: empty stack\n");
1366 ESIL_LOG(
"esil_and: empty stack\n");
1385 ESIL_LOG(
"esil_xor: empty stack\n");
1404 ESIL_LOG(
"esil_xor: empty stack\n");
1419 return "breakpoint";
1501 ESIL_LOG(
"esil_mod: invalid parameters\n");
1515 if (ST64_DIV_OVFCHK(
d,
s)) {
1525 ESIL_LOG(
"esil_mod: invalid parameters\n");
1545 ESIL_LOG(
"esil_modeq: Division by zero!\n");
1551 ESIL_LOG(
"esil_modeq: empty stack\n");
1554 ESIL_LOG(
"esil_modeq: invalid parameters\n");
1569 ESIL_LOG(
"esil_div: Division by zero!\n");
1578 ESIL_LOG(
"esil_div: invalid parameters\n");
1592 if (ST64_DIV_OVFCHK(
d,
s)) {
1593 ESIL_LOG(
"esil_div: Division by zero!\n");
1602 ESIL_LOG(
"esil_div: invalid parameters\n");
1628 ESIL_LOG(
"esil_diveq: empty stack\n");
1631 ESIL_LOG(
"esil_diveq: invalid parameters\n");
1648 ESIL_LOG(
"esil_mul: empty stack\n");
1651 ESIL_LOG(
"esil_mul: invalid parameters\n");
1670 ESIL_LOG(
"esil_muleq: empty stack\n");
1673 ESIL_LOG(
"esil_muleq: invalid parameters\n");
1689 ESIL_LOG(
"esil_add: invalid parameters\n");
1709 ESIL_LOG(
"esil_addeq: invalid parameters\n");
1724 ESIL_LOG(
"esil_inc: invalid parameters\n");
1742 ESIL_LOG(
"esil_inceq: invalid parameters\n");
1756 ESIL_LOG(
"esil_sub: invalid parameters\n");
1776 ESIL_LOG(
"esil_subeq: invalid parameters\n");
1791 ESIL_LOG(
"esil_dec: invalid parameters\n");
1809 ESIL_LOG(
"esil_deceq: invalid parameters\n");
1923 const int size_bytes = regsize / 8;
1925 if (written != size_bytes) {
2081 ESIL_LOG(
"esil_mem_oreq_n: invalid parameters\n");
2127 ESIL_LOG(
"esil_mem_xoreq_n: invalid parameters\n");
2173 ESIL_LOG(
"esil_mem_andeq_n: invalid parameters\n");
2219 ESIL_LOG(
"esil_mem_addeq_n: invalid parameters\n");
2265 ESIL_LOG(
"esil_mem_subeq_n: invalid parameters\n");
2299 ESIL_LOG(
"esil_mem_modeq4: Division by zero!\n");
2318 ESIL_LOG(
"esil_mem_modeq_n: invalid parameters\n");
2352 ESIL_LOG(
"esil_mem_diveq8: Division by zero!\n");
2370 ESIL_LOG(
"esil_mem_diveq_n: invalid parameters\n");
2416 ESIL_LOG(
"esil_mem_muleq_n: invalid parameters\n");
2471 ESIL_LOG(
"esil_mem_inceq_n: invalid parameters\n");
2515 ESIL_LOG(
"esil_mem_deceq_n: invalid parameters\n");
2547 if (
s >
sizeof(
ut64) * 8) {
2548 ESIL_LOG(
"esil_mem_lsleq_n: shift is too big\n");
2568 ESIL_LOG(
"esil_mem_lsleq_n: invalid parameters\n");
2614 ESIL_LOG(
"esil_mem_lsreq_n: invalid parameters\n");
2689 result = (
a & 1) > (
b & 1);
2822 ESIL_LOG(
"esil_set_jump_target: empty stack\n");
2837 ESIL_LOG(
"esil_set_jump_target_set: empty stack\n");
2852 ESIL_LOG(
"esil_set_delay_slot: empty stack\n");
2874 ESIL_LOG(
"ESIL infinite loop detected\n");
2880 if (!strcmp(word,
"}{")) {
2881 if (esil->
skip == 1) {
2883 }
else if (esil->
skip == 0) {
2888 if (!strcmp(word,
"}")) {
2894 if (esil->
skip && strcmp(word,
"?{")) {
2909 const bool ret =
op->
code(esil);
2917 if (!*word || *word ==
',') {
2932 const char *ostr =
str;
2959 if ((*
str)[0] && (*
str)[1] ==
',') {
2985 static bool inCmdStep =
false;
2986 if (
cmd && esil && esil->
cmd && !inCmdStep) {
3002 const char *ostr =
str;
3009 const char *hashbang = strstr(
str,
"#!");
3012 if (!strncmp(
str,
"TODO", 4)) {
3028 if (
str == hashbang) {
3063 if (dorunword == 1) {
3070 word[wordi++] = *
str;
3119 while (*
str ==
' ') {
3133 RZ_LOG_ERROR(
"Cannot pop because The ESIL stack is empty");
3140 #define OP(v, w, x, y, z) rz_analysis_esil_set_op(esil, v, w, x, y, z)
3141 #define OT_UNK RZ_ANALYSIS_ESIL_OP_TYPE_UNKNOWN
3142 #define OT_CTR RZ_ANALYSIS_ESIL_OP_TYPE_CONTROL_FLOW
3143 #define OT_MATH RZ_ANALYSIS_ESIL_OP_TYPE_MATH
3144 #define OT_REGW RZ_ANALYSIS_ESIL_OP_TYPE_REG_WRITE
3145 #define OT_MEMW RZ_ANALYSIS_ESIL_OP_TYPE_MEM_WRITE
3146 #define OT_MEMR RZ_ANALYSIS_ESIL_OP_TYPE_MEM_READ
RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query)
static RZ_NULLABLE RzILOpBitVector * shift(RzILOpBitVector *val, RZ_NULLABLE RzILOpBool **carry_out, arm_shifter type, RZ_OWN RzILOpBitVector *dist)
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c1
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c3
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c2
int bits(struct state *s, int need)
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
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
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 cmd
static int internal_esil_reg_read(RzAnalysisEsil *esil, const char *regname, ut64 *num, int *size)
static bool esil_mem_lsreq1(RzAnalysisEsil *esil)
static bool esil_repeat(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_reg_read_nocallback(RzAnalysisEsil *esil, const char *regname, ut64 *num, int *size)
static bool esil_poke16(RzAnalysisEsil *esil)
static bool esil_trap(RzAnalysisEsil *esil)
static bool esil_mem_addeq(RzAnalysisEsil *esil)
static bool esil_inceq(RzAnalysisEsil *esil)
RZ_API void rz_analysis_esil_stack_free(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_get_parm_size(RzAnalysisEsil *esil, const char *str, ut64 *num, int *size)
static int signed_compare_gt(ut64 a, ut64 b, ut64 size)
static bool esil_mem_diveq8(RzAnalysisEsil *esil)
static bool esil_poke3(RzAnalysisEsil *esil)
static bool esil_signext(RzAnalysisEsil *esil)
static bool esil_poke(RzAnalysisEsil *esil)
static bool esil_addeq(RzAnalysisEsil *esil)
RZ_API RzAnalysisEsil * rz_analysis_esil_new(int stacksize, int iotrap, unsigned int addrsize)
static bool esil_pop(RzAnalysisEsil *esil)
static bool esil_peek3(RzAnalysisEsil *esil)
static bool esil_interrupt(RzAnalysisEsil *esil)
static bool esil_mul(RzAnalysisEsil *esil)
static bool esil_signexteq(RzAnalysisEsil *esil)
static ut8 esil_internal_sizeof_reg(RzAnalysisEsil *esil, const char *r)
static bool esil_peek4(RzAnalysisEsil *esil)
static bool esil_peek8(RzAnalysisEsil *esil)
static bool isregornum(RzAnalysisEsil *esil, const char *str, ut64 *num)
RZ_API int rz_analysis_esil_get_parm(RzAnalysisEsil *esil, const char *str, ut64 *num)
static bool esil_peek_some(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_pushnum(RzAnalysisEsil *esil, ut64 num)
static bool esil_bits(RzAnalysisEsil *esil)
static bool esil_set_jump_target_set(RzAnalysisEsil *esil)
static bool esil_mem_deceq2(RzAnalysisEsil *esil)
static bool esil_mem_diveq2(RzAnalysisEsil *esil)
static bool esil_nop(RzAnalysisEsil *esil)
static bool esil_mem_lsreq4(RzAnalysisEsil *esil)
static bool esil_mem_lsreq8(RzAnalysisEsil *esil)
static bool esil_signed_div(RzAnalysisEsil *esil)
#define OP(v, w, x, y, z)
static bool esil_mem_andeq1(RzAnalysisEsil *esil)
static bool esil_and(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_condition(RzAnalysisEsil *esil, const char *str)
static bool esil_asr(RzAnalysisEsil *esil)
static bool esil_mem_xoreq_n(RzAnalysisEsil *esil, int bits)
static bool esil_ror(RzAnalysisEsil *esil)
static bool esil_break(RzAnalysisEsil *esil)
static bool esil_mem_lsleq2(RzAnalysisEsil *esil)
static bool esil_mem_andeq2(RzAnalysisEsil *esil)
static bool esil_clear(RzAnalysisEsil *esil)
static bool esil_mem_deceq4(RzAnalysisEsil *esil)
static bool esil_lsl(RzAnalysisEsil *esil)
static void esil_ops_free(HtPPKv *kv)
static bool esil_mem_subeq_n(RzAnalysisEsil *esil, int bits)
static bool esil_add(RzAnalysisEsil *esil)
static bool esil_mem_deceq1(RzAnalysisEsil *esil)
static bool esil_mem_xoreq(RzAnalysisEsil *esil)
static bool isnum(RzAnalysisEsil *esil, const char *str, ut64 *num)
static bool esil_oreq(RzAnalysisEsil *esil)
static bool esil_mem_muleq2(RzAnalysisEsil *esil)
static int internal_esil_mem_read_no_null(RzAnalysisEsil *esil, ut64 addr, ut8 *buf, int len)
RZ_API bool rz_analysis_esil_set_pc(RzAnalysisEsil *esil, ut64 addr)
static bool esil_subeq(RzAnalysisEsil *esil)
static int internal_esil_mem_read(RzAnalysisEsil *esil, ut64 addr, ut8 *buf, int len)
static bool esil_mem_muleq_n(RzAnalysisEsil *esil, int bits, ut64 bitmask)
static bool esil_mem_subeq2(RzAnalysisEsil *esil)
static bool esil_todo(RzAnalysisEsil *esil)
RZ_API const char * rz_analysis_esil_trapstr(int type)
static bool popRN(RzAnalysisEsil *esil, ut64 *n)
static bool esil_pf(RzAnalysisEsil *esil)
static bool esil_mem_deceq(RzAnalysisEsil *esil)
static bool esil_mem_inceq8(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_mem_write(RzAnalysisEsil *esil, ut64 addr, const ut8 *buf, int len)
static bool esil_mem_inceq_n(RzAnalysisEsil *esil, int bits)
static bool esil_sub(RzAnalysisEsil *esil)
static bool esil_mem_inceq(RzAnalysisEsil *esil)
static bool esil_poke_some(RzAnalysisEsil *esil)
static bool esil_set_jump_target(RzAnalysisEsil *esil)
static bool esil_smaller_equal(RzAnalysisEsil *esil)
static bool esil_or(RzAnalysisEsil *esil)
static bool esil_mem_muleq(RzAnalysisEsil *esil)
static bool esil_mem_muleq4(RzAnalysisEsil *esil)
static bool esil_mem_modeq8(RzAnalysisEsil *esil)
static bool esil_mem_oreq_n(RzAnalysisEsil *esil, int bits)
#define ESIL_LOG(fmtstr,...)
static bool esil_js(RzAnalysisEsil *esil)
static bool esil_mem_xoreq8(RzAnalysisEsil *esil)
static bool esil_peek2(RzAnalysisEsil *esil)
static bool esil_mem_diveq4(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_reg_read(RzAnalysisEsil *esil, const char *regname, ut64 *num, int *size)
static bool esil_mem_inceq2(RzAnalysisEsil *esil)
static bool esil_mem_addeq2(RzAnalysisEsil *esil)
static int internal_esil_reg_write(RzAnalysisEsil *esil, const char *regname, ut64 num)
static bool esil_mem_xoreq4(RzAnalysisEsil *esil)
static bool esil_cmp(RzAnalysisEsil *esil)
static bool esil_mem_andeq8(RzAnalysisEsil *esil)
static bool esil_mem_diveq_n(RzAnalysisEsil *esil, int bits)
static bool esil_bigger_equal(RzAnalysisEsil *esil)
static bool esil_zf(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_set_op(RzAnalysisEsil *esil, const char *op, RzAnalysisEsilOpCb code, ut32 push, ut32 pop, ut32 type)
static bool esil_mem_oreq1(RzAnalysisEsil *esil)
static bool esil_div(RzAnalysisEsil *esil)
static bool esil_asreq(RzAnalysisEsil *esil)
static bool esil_mod(RzAnalysisEsil *esil)
static int internal_esil_reg_write_no_null(RzAnalysisEsil *esil, const char *regname, ut64 num)
static bool esil_mem_subeq8(RzAnalysisEsil *esil)
static bool esil_if(RzAnalysisEsil *esil)
static bool esil_peek(RzAnalysisEsil *esil)
static bool alignCheck(RzAnalysisEsil *esil, ut64 addr)
static bool esil_mem_xoreq2(RzAnalysisEsil *esil)
static bool esil_mem_lsleq8(RzAnalysisEsil *esil)
static bool esil_of(RzAnalysisEsil *esil)
static bool esil_mem_andeq4(RzAnalysisEsil *esil)
static int internal_esil_mem_write(RzAnalysisEsil *esil, ut64 addr, const ut8 *buf, int len)
static bool iscommand(RzAnalysisEsil *esil, const char *word, RzAnalysisEsilOp **op)
static bool esil_mem_subeq(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_reg_write(RzAnalysisEsil *esil, const char *dst, ut64 num)
static bool esil_negeq(RzAnalysisEsil *esil)
static bool esil_mem_lsreq2(RzAnalysisEsil *esil)
static bool esil_mem_deceq8(RzAnalysisEsil *esil)
static bool esil_mem_subeq1(RzAnalysisEsil *esil)
static bool esil_lsreq(RzAnalysisEsil *esil)
static bool esil_deceq(RzAnalysisEsil *esil)
static bool esil_weak_eq(RzAnalysisEsil *esil)
static bool esil_poke4(RzAnalysisEsil *esil)
static bool esil_mem_lsleq1(RzAnalysisEsil *esil)
static bool esil_lsleq(RzAnalysisEsil *esil)
static bool esil_set_delay_slot(RzAnalysisEsil *esil)
static bool esil_ds(RzAnalysisEsil *esil)
static bool esil_mem_modeq(RzAnalysisEsil *esil)
static bool esil_poke2(RzAnalysisEsil *esil)
static bool esil_stack(RzAnalysisEsil *esil)
RZ_API char * rz_analysis_esil_pop(RzAnalysisEsil *esil)
static void rz_analysis_esil_setup_ops(RzAnalysisEsil *esil)
static bool esil_mem_oreq(RzAnalysisEsil *esil)
static const char * gotoWord(const char *str, int n)
static int evalWord(RzAnalysisEsil *esil, const char *ostr, const char **str)
static bool esil_mem_oreq8(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_setup(RzAnalysisEsil *esil, RzAnalysis *analysis, int romem, int stats, int nonull)
static bool esil_mem_andeq(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_parse(RzAnalysisEsil *esil, const char *str)
static bool esil_peek1(RzAnalysisEsil *esil)
static bool esil_mem_addeq1(RzAnalysisEsil *esil)
static bool esil_mem_lsleq4(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_push(RzAnalysisEsil *esil, const char *str)
static bool esil_lsr(RzAnalysisEsil *esil)
RZ_API void rz_analysis_esil_free(RzAnalysisEsil *esil)
static bool esil_goto(RzAnalysisEsil *esil)
static bool ispackedreg(RzAnalysisEsil *esil, const char *str)
RZ_API int rz_analysis_esil_get_parm_type(RzAnalysisEsil *esil, const char *str)
static bool esil_dup(RzAnalysisEsil *esil)
static bool esil_mem_modeq1(RzAnalysisEsil *esil)
static bool esil_mem_muleq8(RzAnalysisEsil *esil)
static bool esil_mem_modeq_n(RzAnalysisEsil *esil, int bits)
RZ_API int rz_analysis_esil_mem_read(RzAnalysisEsil *esil, ut64 addr, ut8 *buf, int len)
static bool esil_mem_diveq1(RzAnalysisEsil *esil)
static bool esil_neg(RzAnalysisEsil *esil)
static bool esil_sf(RzAnalysisEsil *esil)
static bool esil_signed_mod(RzAnalysisEsil *esil)
static bool __stepOut(RzAnalysisEsil *esil, const char *cmd)
static bool esil_mem_subeq4(RzAnalysisEsil *esil)
static bool esil_muleq(RzAnalysisEsil *esil)
static bool esil_address(RzAnalysisEsil *esil)
static bool esil_mem_deceq_n(RzAnalysisEsil *esil, int bits)
static bool esil_eq(RzAnalysisEsil *esil)
static bool esil_bigger(RzAnalysisEsil *esil)
static bool esil_andeq(RzAnalysisEsil *esil)
static bool esil_mem_inceq1(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_signext(RzAnalysisEsil *esil, bool assign)
static bool esil_mem_lsleq(RzAnalysisEsil *esil)
static bool esil_inc(RzAnalysisEsil *esil)
static bool esil_poke_n(RzAnalysisEsil *esil, int bits)
static bool esil_diveq(RzAnalysisEsil *esil)
static bool esil_mem_addeq_n(RzAnalysisEsil *esil, int bits)
static bool esil_xor(RzAnalysisEsil *esil)
static bool esil_bf(RzAnalysisEsil *esil)
static int internal_esil_mem_write_no_null(RzAnalysisEsil *esil, ut64 addr, const ut8 *buf, int len)
static bool esil_swap(RzAnalysisEsil *esil)
static bool esil_mem_oreq4(RzAnalysisEsil *esil)
static bool esil_num(RzAnalysisEsil *esil)
static bool esil_peek16(RzAnalysisEsil *esil)
static bool esil_xoreq(RzAnalysisEsil *esil)
static bool esil_mem_xoreq1(RzAnalysisEsil *esil)
static bool esil_poke1(RzAnalysisEsil *esil)
static bool esil_mem_diveq(RzAnalysisEsil *esil)
static bool esil_jt(RzAnalysisEsil *esil)
static bool esil_smaller(RzAnalysisEsil *esil)
static bool esil_mem_inceq4(RzAnalysisEsil *esil)
static bool esil_mem_addeq8(RzAnalysisEsil *esil)
static bool esil_peek_n(RzAnalysisEsil *esil, int bits)
static bool esil_poke8(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_runword(RzAnalysisEsil *esil, const char *word)
static bool esil_mem_oreq2(RzAnalysisEsil *esil)
static bool esil_cf(RzAnalysisEsil *esil)
static bool esil_rol(RzAnalysisEsil *esil)
static bool esil_mem_lsreq_n(RzAnalysisEsil *esil, int bits)
static bool esil_mem_addeq4(RzAnalysisEsil *esil)
static bool esil_mem_muleq1(RzAnalysisEsil *esil)
static bool esil_mem_modeq4(RzAnalysisEsil *esil)
static bool esil_modeq(RzAnalysisEsil *esil)
static bool rz_analysis_esil_fire_trap(RzAnalysisEsil *esil, int trap_type, int trap_code)
static bool esil_mem_modeq2(RzAnalysisEsil *esil)
static bool esil_rs(RzAnalysisEsil *esil)
static bool esil_dec(RzAnalysisEsil *esil)
static bool esil_mem_lsreq(RzAnalysisEsil *esil)
static bool runword(RzAnalysisEsil *esil, const char *word)
static ut64 genmask(int bits)
static bool esil_mem_andeq_n(RzAnalysisEsil *esil, int bits)
static bool esil_mem_lsleq_n(RzAnalysisEsil *esil, int bits)
RZ_API void rz_analysis_esil_interrupts_init(RzAnalysisEsil *esil)
RZ_API int rz_analysis_esil_fire_interrupt(RzAnalysisEsil *esil, ut32 intr_num)
RZ_API void rz_analysis_esil_interrupts_fini(RzAnalysisEsil *esil)
RZ_API void rz_analysis_esil_sources_init(RzAnalysisEsil *esil)
RZ_API void rz_analysis_esil_sources_fini(RzAnalysisEsil *esil)
RZ_API void rz_analysis_esil_mem_ro(RzAnalysisEsil *esil, int mem_readonly)
RZ_API void rz_analysis_esil_stats(RzAnalysisEsil *esil, int enable)
RZ_API void rz_analysis_esil_trace_free(RzAnalysisEsilTrace *trace)
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * calloc(size_t number, size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode dup
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API void * sdb_ptr_get(Sdb *db, const char *key, ut32 *cas)
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
RZ_API const char * rz_reg_get_name(RzReg *reg, int role)
static void repeat(struct parse *, sopno, int, int)
RZ_API bool rz_reg_set_value(RzReg *reg, RzRegItem *item, ut64 value)
RZ_API ut64 rz_reg_get_value(RzReg *reg, RzRegItem *item)
#define RZ_ANALYSIS_ARCHINFO_DATA_ALIGN
@ RZ_ANALYSIS_ESIL_PARM_NUM
@ RZ_ANALYSIS_ESIL_PARM_INVALID
@ RZ_ANALYSIS_ESIL_PARM_REG
bool(* RzAnalysisEsilOpCb)(RzAnalysisEsil *esil)
#define RZ_ANALYSIS_ESIL_GOTO_LIMIT
@ RZ_ANALYSIS_TRAP_UNHANDLED
@ RZ_ANALYSIS_TRAP_DIVBYZERO
@ RZ_ANALYSIS_TRAP_INVALID
@ RZ_ANALYSIS_TRAP_WRITE_ERR
@ RZ_ANALYSIS_TRAP_READ_ERR
@ RZ_ANALYSIS_TRAP_UNALIGNED
@ RZ_ANALYSIS_TRAP_BREAKPOINT
int(* RzAnalysisEsilTrapCB)(RzAnalysisEsil *esil, int trap_type, int trap_code)
#define rz_return_val_if_fail(expr, val)
static ut64 rz_read_ble64(const void *src, bool big_endian)
static void rz_write_ble(void *dst, ut64 val, bool big_endian, int size)
static ut32 rz_read_ble32(const void *src, bool big_endian)
#define RZ_LOG_WARN(fmtstr,...)
#define RZ_LOG_DEBUG(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API void rz_mem_swapendian(ut8 *dest, const ut8 *orig, int size)
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
#define RZ_STR_ISNOTEMPTY(x)
RZ_API bool rz_str_range_in(const char *r, ut64 addr)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API const char * rz_strbuf_set(RzStrBuf *sb, const char *s)
RZ_API void rz_strbuf_fini(RzStrBuf *sb)
RZ_API void rz_strbuf_init(RzStrBuf *sb)
RZ_API bool sdb_free(Sdb *s)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
static struct sockaddr static addrlen static backlog const void static flags void flags
int(* mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len)
int(* hook_mem_read)(ANALYSIS_ESIL *esil, ut64 addr, ut8 *buf, int len)
int(* mem_read)(ANALYSIS_ESIL *esil, ut64 addr, ut8 *buf, int len)
int(* hook_command)(ANALYSIS_ESIL *esil, const char *op)
int(* reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size)
int(* hook_reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size)
int(* hook_mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len)
int(* reg_write)(ANALYSIS_ESIL *esil, const char *name, ut64 val)
RzAnalysisEsilHookRegWriteCB hook_reg_write
RzAnalysisEsilCallbacks cb
RzAnalysisEsilTrace * trace
bool(* cmd)(ANALYSIS_ESIL *esil, const char *name, ut64 a0, ut64 a1)
RzAnalysisEsilCB esil_fini
RzAnalysisEsilTrapCB esil_trap
RzAnalysisEsilCB esil_init
struct rz_analysis_plugin_t * cur
struct rz_analysis_esil_t * esil
RzIOIsValidOff is_valid_offset
int size
in bits> 8,16,32,64 ... 128/256
int packed_size
0 means no packed register, 1byte pack, 2b pack...
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static char * regname(int reg)
int read(izstream &zs, T *x, Items items)