Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_il/rz_il_vm.h>
Go to the source code of this file.
Variables | |
RZ_IPI RzILOpPureHandler | rz_il_op_handler_pure_table_default [RZ_IL_OP_PURE_MAX] |
RZ_IPI RzILOpEffectHandler | rz_il_op_handler_effect_table_default [RZ_IL_OP_EFFECT_MAX] |
RzIL Virtual Machine Evaluation (Emulation)
Definition in file il_vm_eval.c.
|
static |
Definition at line 247 of file il_vm_eval.c.
References op::code, NULL, and rz_return_val_if_fail.
Referenced by rz_il_evaluate_effect().
|
static |
Definition at line 240 of file il_vm_eval.c.
References op::code, NULL, rz_return_val_if_fail, and type.
Referenced by rz_il_evaluate_bitv(), rz_il_evaluate_bool(), rz_il_evaluate_pure(), and rz_il_evaluate_val().
|
static |
Definition at line 254 of file il_vm_eval.c.
References RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, and type.
Referenced by rz_il_evaluate_bitv(), rz_il_evaluate_bool(), and rz_il_evaluate_val().
RZ_API RZ_NULLABLE RZ_OWN RzBitVector* rz_il_evaluate_bitv | ( | RZ_NONNULL RzILVM * | vm, |
RZ_NONNULL RzILOpBitVector * | op | ||
) |
Evaluate the given pure op, asserting it returns a bitvector.
Definition at line 269 of file il_vm_eval.c.
References eval_pure(), NULL, pure_type_name(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_LOG_ERROR, rz_return_val_if_fail, and type.
Referenced by rz_il_handler_add(), rz_il_handler_append(), rz_il_handler_cast(), rz_il_handler_div(), rz_il_handler_eq(), rz_il_handler_is_zero(), rz_il_handler_jmp(), rz_il_handler_load(), rz_il_handler_loadw(), rz_il_handler_logical_and(), rz_il_handler_logical_not(), rz_il_handler_logical_or(), rz_il_handler_logical_xor(), rz_il_handler_lsb(), rz_il_handler_mod(), rz_il_handler_msb(), rz_il_handler_mul(), rz_il_handler_neg(), rz_il_handler_sdiv(), rz_il_handler_shiftl(), rz_il_handler_shiftr(), rz_il_handler_sle(), rz_il_handler_smod(), rz_il_handler_store(), rz_il_handler_storew(), rz_il_handler_sub(), and rz_il_handler_ule().
RZ_API RZ_NULLABLE RZ_OWN RzILBool* rz_il_evaluate_bool | ( | RZ_NONNULL RzILVM * | vm, |
RZ_NONNULL RzILOpBool * | op | ||
) |
Evaluate the given pure op, asserting it returns a bool.
Definition at line 289 of file il_vm_eval.c.
References eval_pure(), NULL, pure_type_name(), RZ_IL_TYPE_PURE_BOOL, RZ_LOG_ERROR, rz_return_val_if_fail, and type.
Referenced by rz_il_handler_bool_and(), rz_il_handler_bool_inv(), rz_il_handler_bool_or(), rz_il_handler_bool_xor(), rz_il_handler_branch(), rz_il_handler_cast(), rz_il_handler_ite(), rz_il_handler_repeat(), rz_il_handler_shiftl(), and rz_il_handler_shiftr().
RZ_API bool rz_il_evaluate_effect | ( | RZ_NONNULL RzILVM * | vm, |
RZ_NONNULL RzILOpEffect * | op | ||
) |
Evaluate (execute) the given effect op
Definition at line 341 of file il_vm_eval.c.
References eval_effect(), and rz_return_val_if_fail.
Referenced by rz_il_handler_blk(), rz_il_handler_branch(), rz_il_handler_repeat(), rz_il_handler_seq(), and rz_il_vm_step().
RZ_API RZ_NULLABLE RZ_OWN void* rz_il_evaluate_pure | ( | RZ_NONNULL RzILVM * | vm, |
RZ_NONNULL RzILOpPure * | op, | ||
RZ_NONNULL RzILTypePure * | type | ||
) |
Evaluate the given pure op, returning the resulting value and its type.
Definition at line 332 of file il_vm_eval.c.
References eval_pure(), NULL, rz_return_val_if_fail, and type.
Referenced by rz_il_handler_ite(), and rz_il_handler_let().
RZ_API RZ_NULLABLE RZ_OWN RzILVal* rz_il_evaluate_val | ( | RZ_NONNULL RzILVM * | vm, |
RZ_NONNULL RzILOpPure * | op | ||
) |
Evaluate the given pure op, returning the resulting bool or bitvector.
Definition at line 309 of file il_vm_eval.c.
References eval_pure(), NULL, pure_type_name(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, rz_il_value_new_bitv(), rz_il_value_new_bool(), RZ_LOG_ERROR, rz_return_val_if_fail, and type.
Referenced by rz_il_handler_let(), and rz_il_handler_set().
void* rz_il_handler_add | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 114 of file theory_bitv.c.
References NULL, rz_bv_add(), rz_bv_free(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_append | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 130 of file theory_bitv.c.
References rz_il_op_args_append_t::high, rz_il_op_args_append_t::low, NULL, rz_bv_append(), rz_bv_free(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, and type.
void* rz_il_handler_bitv | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 336 of file theory_bitv.c.
References NULL, rz_bv_dup(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, and rz_il_op_args_bv_t::value.
bool rz_il_handler_blk | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 89 of file theory_effect.c.
References rzil_op_blk_t::ctrl_eff, rzil_op_blk_t::data_eff, rzil_op_blk_t::label, rz_il_vm_t::pc, rz_il_evaluate_effect(), rz_il_vm_create_label(), and rz_return_val_if_fail.
void* rz_il_handler_bool_and | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 29 of file theory_bool.c.
References NULL, rz_il_bool_and(), rz_il_bool_free(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, rz_il_op_args_bool_operation_t::x, and rz_il_op_args_bool_operation_t::y.
void* rz_il_handler_bool_false | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
also known as b0
Definition at line 10 of file theory_bool.c.
References NULL, rz_il_bool_new(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, and type.
void* rz_il_handler_bool_inv | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
also known as boolean not
Definition at line 77 of file theory_bool.c.
References NULL, rz_il_bool_free(), rz_il_bool_not(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, and rz_il_op_args_bool_inv_t::x.
void* rz_il_handler_bool_or | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 44 of file theory_bool.c.
References NULL, rz_il_bool_free(), rz_il_bool_or(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, rz_il_op_args_bool_operation_t::x, and rz_il_op_args_bool_operation_t::y.
void* rz_il_handler_bool_true | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
also known as b1
Definition at line 21 of file theory_bool.c.
References NULL, rz_il_bool_new(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, and type.
void* rz_il_handler_bool_xor | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 59 of file theory_bool.c.
References NULL, rz_il_bool_free(), rz_il_bool_xor(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, rz_il_op_args_bool_operation_t::x, and rz_il_op_args_bool_operation_t::y.
bool rz_il_handler_branch | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 118 of file theory_effect.c.
References rz_il_bool_t::b, rz_il_op_args_branch_t::condition, rz_il_op_args_branch_t::false_eff, rz_il_bool_free(), rz_il_evaluate_bool(), rz_il_evaluate_effect(), rz_return_val_if_fail, and rz_il_op_args_branch_t::true_eff.
void* rz_il_handler_cast | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 346 of file theory_bitv.c.
References rz_il_bool_t::b, rz_il_op_args_cast_t::fill, bitvector_t::len, rz_il_op_args_cast_t::length, NULL, rz_bv_copy_nbits(), rz_bv_free(), rz_bv_new(), rz_bv_set_all(), rz_il_bool_free(), rz_il_evaluate_bitv(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_MIN, rz_return_val_if_fail, type, and rz_il_op_args_cast_t::val.
void* rz_il_handler_div | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 221 of file theory_bitv.c.
References bitvector_t::len, NULL, rz_bv_div(), rz_bv_free(), rz_bv_is_zero_vector(), rz_bv_new(), rz_bv_set_all(), rz_il_evaluate_bitv(), rz_il_event_exception_new(), RZ_IL_TYPE_PURE_BITVECTOR, rz_il_vm_event_add(), rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
bool rz_il_handler_effect_unimplemented | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 76 of file theory_init.c.
References op::code, NULL, RZ_LOG_ERROR, and rz_return_val_if_fail.
bool rz_il_handler_empty | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 28 of file theory_effect.c.
References rz_il_vm_t::pc, rz_bv_as_string(), RZ_LOG_WARN, and rz_return_val_if_fail.
void* rz_il_handler_eq | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 69 of file theory_bitv.c.
References NULL, rz_bv_eq(), rz_bv_free(), rz_il_bool_new(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, rz_il_op_args_cmp_t::x, and rz_il_op_args_cmp_t::y.
bool rz_il_handler_goto | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 66 of file theory_effect.c.
References EFFECT_LABEL_HOOK, EFFECT_LABEL_SYSCALL, rz_il_op_args_goto_t::lbl, perform_jump(), rz_bv_dup(), rz_il_vm_find_label_by_name(), and rz_return_val_if_fail.
void* rz_il_handler_is_zero | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 31 of file theory_bitv.c.
References rz_il_op_args_un_bv_b_t::bv, NULL, rz_bv_free(), rz_bv_is_zero_vector(), rz_il_bool_new(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, and type.
void* rz_il_handler_ite | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 7 of file theory_init.c.
References rz_il_bool_t::b, rz_il_op_args_ite_t::condition, NULL, rz_il_bool_free(), rz_il_evaluate_bool(), rz_il_evaluate_pure(), rz_return_val_if_fail, type, rz_il_op_args_ite_t::x, and rz_il_op_args_ite_t::y.
bool rz_il_handler_jmp | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 56 of file theory_effect.c.
References dst, perform_jump(), rz_il_evaluate_bitv(), and rz_return_val_if_fail.
void* rz_il_handler_let | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 57 of file theory_init.c.
References args, NULL, r, rz_il_evaluate_pure(), rz_il_evaluate_val(), rz_il_vm_pop_local_pure_var(), rz_il_vm_push_local_pure_var(), rz_return_val_if_fail, type, and v.
void* rz_il_handler_load | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 8 of file theory_mem.c.
References addr, rz_il_op_args_load_t::key, rz_il_op_args_load_t::mem, NULL, rz_bv_free(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_il_vm_mem_load(), rz_return_val_if_fail, and type.
void* rz_il_handler_loadw | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 41 of file theory_mem.c.
References addr, rz_il_op_args_loadw_t::key, rz_il_op_args_loadw_t::mem, rz_il_op_args_loadw_t::n_bits, NULL, rz_bv_free(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_il_vm_mem_loadw(), rz_return_val_if_fail, and type.
void* rz_il_handler_logical_and | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 145 of file theory_bitv.c.
References NULL, rz_bv_and(), rz_bv_free(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_logical_not | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 56 of file theory_bitv.c.
References rz_il_op_args_bv_unop_t::bv, NULL, rz_bv_free(), rz_bv_not, rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, and type.
void* rz_il_handler_logical_or | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 160 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_or(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_logical_xor | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 175 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_xor(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_lsb | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 19 of file theory_bitv.c.
References rz_il_op_args_un_bv_b_t::bv, NULL, rz_bv_free(), rz_bv_lsb(), rz_il_bool_new(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, and type.
void* rz_il_handler_mod | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 261 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_mod(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_msb | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 7 of file theory_bitv.c.
References rz_il_op_args_un_bv_b_t::bv, NULL, rz_bv_free(), rz_bv_msb(), rz_il_bool_new(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, and type.
void* rz_il_handler_mul | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 205 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_mul(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_neg | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 43 of file theory_bitv.c.
References neg(), NULL, rz_bv_free(), rz_bv_neg, rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, and type.
bool rz_il_handler_nop | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 34 of file theory_effect.c.
References rz_return_val_if_fail.
void* rz_il_handler_pure_unimplemented | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 70 of file theory_init.c.
References op::code, NULL, RZ_LOG_ERROR, rz_return_val_if_fail, and type.
bool rz_il_handler_repeat | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 100 of file theory_effect.c.
References rz_il_bool_t::b, rzil_op_repeat_t::condition, rzil_op_repeat_t::data_eff, NULL, rz_il_bool_free(), rz_il_evaluate_bool(), rz_il_evaluate_effect(), and rz_return_val_if_fail.
void* rz_il_handler_sdiv | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 246 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_sdiv(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
bool rz_il_handler_seq | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 83 of file theory_effect.c.
References rz_il_evaluate_effect(), rz_return_val_if_fail, rz_il_op_args_seq_t::x, and rz_il_op_args_seq_t::y.
bool rz_il_handler_set | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 39 of file theory_effect.c.
References rz_il_op_args_set_t::is_local, rz_il_evaluate_val(), rz_il_set(), rz_return_val_if_fail, rz_il_op_args_set_t::v, val, and rz_il_op_args_set_t::x.
void* rz_il_handler_shiftl | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 291 of file theory_bitv.c.
References rz_il_bool_t::b, rz_il_op_args_shift_t::fill_bit, NULL, rz_bv_dup(), rz_bv_free(), rz_bv_lshift_fill(), rz_bv_to_ut32(), rz_il_bool_free(), rz_il_evaluate_bitv(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, shift(), type, rz_il_op_args_shift_t::x, and rz_il_op_args_shift_t::y.
void* rz_il_handler_shiftr | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 313 of file theory_bitv.c.
References rz_il_bool_t::b, rz_il_op_args_shift_t::fill_bit, NULL, rz_bv_dup(), rz_bv_free(), rz_bv_rshift_fill(), rz_bv_to_ut32(), rz_il_bool_free(), rz_il_evaluate_bitv(), rz_il_evaluate_bool(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, shift(), type, rz_il_op_args_shift_t::x, and rz_il_op_args_shift_t::y.
void* rz_il_handler_sle | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 84 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_sle(), rz_il_bool_new(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, rz_il_op_args_cmp_t::x, and rz_il_op_args_cmp_t::y.
void* rz_il_handler_smod | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 276 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_smod(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
bool rz_il_handler_store | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 22 of file theory_mem.c.
References addr, rz_il_op_args_store_t::key, rz_il_op_args_store_t::mem, NULL, rz_bv_free(), rz_il_evaluate_bitv(), rz_il_vm_mem_store(), rz_return_val_if_fail, value, and rz_il_op_args_store_t::value.
bool rz_il_handler_storew | ( | RzILVM * | vm, |
RzILOpEffect * | op | ||
) |
Definition at line 55 of file theory_mem.c.
References addr, rz_il_op_args_storew_t::key, rz_il_op_args_storew_t::mem, NULL, rz_bv_free(), rz_il_evaluate_bitv(), rz_il_vm_mem_storew(), rz_return_val_if_fail, value, and rz_il_op_args_storew_t::value.
void* rz_il_handler_sub | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 190 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_sub(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BITVECTOR, rz_return_val_if_fail, type, x, rz_il_op_args_alg_log_operations_t::x, and rz_il_op_args_alg_log_operations_t::y.
void* rz_il_handler_ule | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 99 of file theory_bitv.c.
References NULL, rz_bv_free(), rz_bv_ule(), rz_il_bool_new(), rz_il_evaluate_bitv(), RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, type, x, rz_il_op_args_cmp_t::x, and rz_il_op_args_cmp_t::y.
void* rz_il_handler_var | ( | RzILVM * | vm, |
RzILOpPure * | op, | ||
RzILTypePure * | type | ||
) |
Definition at line 26 of file theory_init.c.
References rz_il_op_args_var_t::kind, NULL, rz_bv_dup(), rz_il_bool_new(), rz_il_event_var_read_new(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, RZ_IL_VAR_KIND_GLOBAL, rz_il_var_kind_name(), rz_il_vm_event_add(), rz_il_vm_get_var_value(), RZ_LOG_ERROR, rz_return_val_if_fail, type, rz_il_op_args_var_t::v, and val.
Remove any recorded events from vm->events
Definition at line 212 of file il_vm_eval.c.
References rz_il_vm_t::events, and rz_list_purge().
Referenced by rz_il_vm_step().
Adds to the VM a new event into the VM event list
vm,RzILVM,pointer | to the VM |
evt,RzILEvent,pointer | to the event |
Definition at line 201 of file il_vm_eval.c.
References rz_il_vm_t::events, rz_il_event_free(), rz_list_append(), rz_return_if_fail, and rz_warn_if_reached.
Referenced by perform_jump(), rz_il_handler_div(), rz_il_handler_var(), rz_il_set(), rz_il_vm_mem_load(), rz_il_vm_mem_loadw(), rz_il_vm_mem_store(), rz_il_vm_mem_storew(), and rz_il_vm_step().
RZ_API RzBitVector* rz_il_vm_mem_load | ( | RzILVM * | vm, |
RzILMemIndex | index, | ||
RzBitVector * | key | ||
) |
Load data from memory by given key and generates an RZ_IL_EVENT_MEM_READ event
vm | RzILVM, pointer to VM |
key | RzBitVector, aka address, a key to load data from memory |
vm->min_unit_size
length Definition at line 124 of file il_vm_eval.c.
References key, mem, NULL, rz_il_event_mem_read_new(), rz_il_mem_load(), rz_il_vm_event_add(), rz_il_vm_get_mem(), RZ_LOG_ERROR, rz_return_val_if_fail, and value.
Referenced by bf_syscall_write(), and rz_il_handler_load().
RZ_API RzBitVector* rz_il_vm_mem_loadw | ( | RzILVM * | vm, |
RzILMemIndex | index, | ||
RzBitVector * | key, | ||
ut32 | n_bits | ||
) |
Load data from memory by given key and generates an RZ_IL_EVENT_MEM_READ event
vm | RzILVM, pointer to VM |
key | RzBitVector, aka address, a key to load data from memory |
vm->min_unit_size
length Definition at line 163 of file il_vm_eval.c.
References rz_il_vm_t::big_endian, key, mem, NULL, rz_il_event_mem_read_new(), rz_il_mem_loadw(), rz_il_vm_event_add(), rz_il_vm_get_mem(), RZ_LOG_ERROR, rz_return_val_if_fail, and value.
Referenced by rz_il_handler_loadw().
RZ_API void rz_il_vm_mem_store | ( | RzILVM * | vm, |
RzILMemIndex | index, | ||
RzBitVector * | key, | ||
RzBitVector * | value | ||
) |
Store data to memory by key, will create a key-value pair or update the key-value pair if key existed; also generates an RZ_IL_EVENT_MEM_WRITE event
vm | RzILVM* pointer to VM |
key | RzBitVector, aka address, a key to store data from memory |
value | RzBitVector, aka value to store in memory |
Definition at line 144 of file il_vm_eval.c.
References key, mem, rz_bv_free(), rz_il_event_mem_write_new(), rz_il_mem_load(), rz_il_mem_store(), rz_il_vm_event_add(), rz_il_vm_get_mem(), RZ_LOG_ERROR, rz_return_if_fail, and value.
Referenced by bf_syscall_read(), and rz_il_handler_store().
RZ_API void rz_il_vm_mem_storew | ( | RzILVM * | vm, |
RzILMemIndex | index, | ||
RzBitVector * | key, | ||
RzBitVector * | value | ||
) |
Store data to memory by key, will create a key-value pair or update the key-value pair if key existed; also generates an RZ_IL_EVENT_MEM_WRITE event
vm | RzILVM* pointer to VM |
key | RzBitVector, aka address, a key to store data from memory |
value | RzBitVector, aka value to store in memory |
Definition at line 183 of file il_vm_eval.c.
References rz_il_vm_t::big_endian, key, mem, rz_bv_free(), rz_bv_len(), rz_il_event_mem_write_new(), rz_il_mem_loadw(), rz_il_mem_storew(), rz_il_vm_event_add(), rz_il_vm_get_mem(), RZ_LOG_ERROR, rz_return_if_fail, and value.
Referenced by rz_il_handler_storew().
RZ_API bool rz_il_vm_step | ( | RzILVM * | vm, |
RzILOpEffect * | op, | ||
ut64 | fallthrough_addr | ||
) |
Execute the opcodes uplifted from raw instructions.A list may contain multiple opcode trees
vm | pointer to VM |
op_list,a | list of op roots. |
fallthrough_addr | initial address to set PC to. Thus also the address to "step to" if no explicit jump occurs. |
Definition at line 222 of file il_vm_eval.c.
References bitvector_t::len, rz_il_vm_t::local_vars, rz_il_vm_t::pc, rz_bv_free(), rz_bv_new_from_ut64(), rz_il_evaluate_effect(), rz_il_event_pc_write_new(), rz_il_var_set_reset(), rz_il_vm_clear_events(), rz_il_vm_event_add(), and rz_return_val_if_fail.
Referenced by rz_analysis_il_vm_step().
RZ_IPI RzILOpEffectHandler rz_il_op_handler_effect_table_default[RZ_IL_OP_EFFECT_MAX] |
Definition at line 104 of file il_vm_eval.c.
Referenced by rz_il_vm_init().
RZ_IPI RzILOpPureHandler rz_il_op_handler_pure_table_default[RZ_IL_OP_PURE_MAX] |
Definition at line 67 of file il_vm_eval.c.
Referenced by rz_il_vm_init().