Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_il/definitions/value.h>
Go to the source code of this file.
Clone an RzILVal
val | RzILVal, pointer to the value you want to dump |
Definition at line 85 of file value.c.
References b, NULL, rz_bv_dup(), rz_il_bool_new(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, rz_il_value_new_bitv(), rz_il_value_new_bool(), rz_return_val_if_fail, rz_warn_if_reached, and val.
Referenced by rz_il_event_var_read_new(), rz_il_event_var_write_new(), and setup_vm_init_state().
RZ_API bool rz_il_value_eq | ( | RZ_NONNULL const RzILVal * | a, |
RZ_NONNULL const RzILVal * | b | ||
) |
Check if two IL values are of equal sort and contents
Definition at line 157 of file value.c.
References a, b, rz_bv_eq(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, and rz_warn_if_reached.
RZ_API void rz_il_value_free | ( | RZ_NULLABLE RzILVal * | val | ) |
Free a RzILVal value
val | RzILVal, pointer to the RzILVal instance |
Definition at line 107 of file value.c.
References free(), rz_bv_free(), rz_il_bool_free(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, and val.
Referenced by rz_analysis_il_init_state_set_var(), rz_il_event_free(), rz_il_value_new_zero_of(), rz_il_var_set_bind(), rz_il_vm_pop_local_pure_var(), val_ht_free(), and var_state_free().
RZ_API RzILSortPure rz_il_value_get_sort | ( | RZ_NONNULL RzILVal * | val | ) |
Get the sort that val
belongs to
Definition at line 127 of file value.c.
References r, rz_bv_len(), RZ_IL_TYPE_PURE_BITVECTOR, and val.
Referenced by rz_il_var_set_bind(), rz_il_vm_pop_local_pure_var(), rz_il_vm_push_local_pure_var(), and rz_il_vm_set_local_var().
RZ_API RZ_OWN RzILVal* rz_il_value_new | ( | RzILTypePure | type | ) |
Returns a new RzILVal (Any type)
type | RzILVarType to set of the value |
Definition at line 13 of file value.c.
References NULL, RZ_NEW0, type, and rz_il_val_t::type.
Referenced by rz_il_value_new_bitv(), rz_il_value_new_bool(), and rz_il_value_new_zero_of().
RZ_API RZ_OWN RzILVal* rz_il_value_new_bitv | ( | RZ_NONNULL RzBitVector * | bv | ) |
Returns a new RzILVal (Bitvector type)
bv | RzBitVector to set |
Definition at line 28 of file value.c.
References RzValUnion::bv, rz_il_val_t::data, NULL, RZ_IL_TYPE_PURE_BITVECTOR, rz_il_value_new(), and rz_return_val_if_fail.
Referenced by il_config(), rz_core_analysis_il_vm_set(), rz_il_evaluate_val(), rz_il_value_dup(), and rz_il_vm_sync_from_reg().
RZ_API RZ_OWN RzILVal* rz_il_value_new_bool | ( | RZ_NONNULL RzILBool * | b | ) |
Returns a new RzILVal (Bool type)
b | RzILBool to set |
Definition at line 43 of file value.c.
References RzValUnion::b, b, rz_il_val_t::data, NULL, RZ_IL_TYPE_PURE_BOOL, rz_il_value_new(), and rz_return_val_if_fail.
Referenced by rz_core_analysis_il_vm_set(), rz_il_evaluate_val(), rz_il_value_dup(), and rz_il_vm_sync_from_reg().
RZ_API RZ_OWN RzILVal* rz_il_value_new_zero_of | ( | RzILSortPure | sort | ) |
Create a value of the given sort filled with all zeroes or false
Definition at line 56 of file value.c.
References RzValUnion::b, rz_il_sort_pure_t::bv, RzValUnion::bv, rz_il_val_t::data, NULL, rz_il_sort_pure_t::props, rz_bv_new_zero, rz_il_bool_new(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, rz_il_value_free(), rz_il_value_new(), and rz_il_sort_pure_t::type.
Referenced by rz_il_vm_create_global_var().
RZ_API RZ_OWN RzBitVector* rz_il_value_to_bv | ( | RZ_NONNULL const RzILVal * | val | ) |
Convert the value's contents to a bitvector. For bitvector values, this is simply a copy of the value, for boolean it is a 1-bit bitvector of 1 or 0.
Definition at line 141 of file value.c.
References NULL, rz_bv_dup(), rz_bv_new_from_ut64(), RZ_IL_TYPE_PURE_BITVECTOR, RZ_IL_TYPE_PURE_BOOL, rz_return_val_if_fail, rz_warn_if_reached, and val.
Referenced by rz_il_value_stringify().