Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_il/rz_il_events.h>
Go to the source code of this file.
Functions | |
RZ_API void | rz_il_event_free (RZ_NULLABLE RzILEvent *evt) |
RZ_API RZ_OWN RzILEvent * | rz_il_event_exception_new (RZ_NONNULL const char *exception) |
RZ_API RZ_OWN RzILEvent * | rz_il_event_pc_write_new (RZ_NONNULL const RzBitVector *old_pc, RZ_NONNULL const RzBitVector *new_pc) |
RZ_API RZ_OWN RzILEvent * | rz_il_event_mem_read_new (RZ_NONNULL const RzBitVector *address, RZ_NULLABLE const RzBitVector *value) |
RZ_API RZ_OWN RzILEvent * | rz_il_event_mem_write_new (RZ_NONNULL const RzBitVector *addr, RZ_NONNULL const RzBitVector *old_v, RZ_NONNULL const RzBitVector *new_v) |
RZ_API RZ_OWN RzILEvent * | rz_il_event_var_read_new (RZ_NONNULL const char *name, RZ_NULLABLE const RzILVal *value) |
RZ_API RZ_OWN RzILEvent * | rz_il_event_var_write_new (RZ_NONNULL const char *name, RZ_NULLABLE const RzILVal *old_v, RZ_NONNULL const RzILVal *new_v) |
RZ_API RZ_OWN RzILEvent* rz_il_event_exception_new | ( | RZ_NONNULL const char * | exception | ) |
Creates an RzILEvent of type RZ_IL_EVENT_EXCEPTION
exception,const | char, pointer to the exception message |
Definition at line 52 of file il_events.c.
References rz_il_vm_event_t::data, exception, rz_il_vm_event_t::exception, NULL, RZ_IL_EVENT_EXCEPTION, rz_il_event_free(), RZ_LOG_ERROR, RZ_NEW, rz_return_val_if_fail, strdup(), and rz_il_vm_event_t::type.
Referenced by rz_il_handler_div().
RZ_API void rz_il_event_free | ( | RZ_NULLABLE RzILEvent * | evt | ) |
Frees an RzILEvent struct
evt,RzILEvent,pointer | to the RzILEvent to free |
Definition at line 11 of file il_events.c.
References free(), rz_bv_free(), RZ_IL_EVENT_EXCEPTION, RZ_IL_EVENT_MEM_READ, RZ_IL_EVENT_MEM_WRITE, RZ_IL_EVENT_PC_WRITE, RZ_IL_EVENT_VAR_READ, RZ_IL_EVENT_VAR_WRITE, rz_il_value_free(), and rz_warn_if_reached.
Referenced by rz_il_event_exception_new(), rz_il_event_mem_read_new(), rz_il_event_mem_write_new(), rz_il_event_pc_write_new(), rz_il_event_var_read_new(), rz_il_event_var_write_new(), rz_il_vm_event_add(), and rz_il_vm_init().
RZ_API RZ_OWN RzILEvent* rz_il_event_mem_read_new | ( | RZ_NONNULL const RzBitVector * | address, |
RZ_NULLABLE const RzBitVector * | value | ||
) |
Creates an RzILEvent of type RZ_IL_EVENT_MEM_READ
addr,RzBitVector,address | of the memory where the read op has occurred |
value,RzBitVector,value | read from the variable |
Definition at line 100 of file il_events.c.
References rz_il_vm_event_mem_read_t::address, rz_il_vm_event_t::data, rz_il_vm_event_t::mem_read, NULL, rz_bv_dup(), rz_il_event_free(), RZ_IL_EVENT_MEM_READ, RZ_NEW, rz_return_val_if_fail, rz_il_vm_event_t::type, value, and rz_il_vm_event_mem_read_t::value.
Referenced by rz_il_vm_mem_load(), and rz_il_vm_mem_loadw().
RZ_API RZ_OWN RzILEvent* rz_il_event_mem_write_new | ( | RZ_NONNULL const RzBitVector * | addr, |
RZ_NONNULL const RzBitVector * | old_v, | ||
RZ_NONNULL const RzBitVector * | new_v | ||
) |
Creates an RzILEvent of type RZ_IL_EVENT_MEM_WRITE
addr,RzBitVector,address | of the memory that has changed |
old_v,RzBitVector,old | value before the change |
new_v,RzBitVector,new | value after the change |
Definition at line 125 of file il_events.c.
References addr, rz_il_vm_event_mem_write_t::address, rz_il_vm_event_t::data, rz_il_vm_event_t::mem_write, rz_il_vm_event_mem_write_t::new_value, NULL, rz_il_vm_event_mem_write_t::old_value, rz_bv_dup(), rz_il_event_free(), RZ_IL_EVENT_MEM_WRITE, RZ_NEW, rz_return_val_if_fail, and rz_il_vm_event_t::type.
Referenced by rz_il_vm_mem_store(), and rz_il_vm_mem_storew().
RZ_API RZ_OWN RzILEvent* rz_il_event_pc_write_new | ( | RZ_NONNULL const RzBitVector * | old_pc, |
RZ_NONNULL const RzBitVector * | new_pc | ||
) |
Creates an RzILEvent of type RZ_IL_EVENT_PC_WRITE
old_pc,RzBitVector,old | program counter value before the change |
new_pc,RzBitVector,new | program counter value after the change |
Definition at line 76 of file il_events.c.
References rz_il_vm_event_t::data, rz_il_vm_event_pc_write_t::new_pc, NULL, rz_il_vm_event_pc_write_t::old_pc, rz_il_vm_event_t::pc_write, rz_bv_dup(), rz_il_event_free(), RZ_IL_EVENT_PC_WRITE, RZ_NEW, rz_return_val_if_fail, and rz_il_vm_event_t::type.
Referenced by perform_jump(), and rz_il_vm_step().
RZ_API RZ_OWN RzILEvent* rz_il_event_var_read_new | ( | RZ_NONNULL const char * | name, |
RZ_NULLABLE const RzILVal * | value | ||
) |
Creates an RzILEvent of type RZ_IL_EVENT_VAR_READ
name | register name that has changed |
value | value read from the variable |
Definition at line 152 of file il_events.c.
References rz_il_vm_event_t::data, NULL, rz_il_event_free(), RZ_IL_EVENT_VAR_READ, rz_il_value_dup(), RZ_NEW, rz_return_val_if_fail, strdup(), rz_il_vm_event_t::type, value, rz_il_vm_event_var_read_t::value, rz_il_vm_event_t::var_read, and rz_il_vm_event_var_read_t::variable.
Referenced by rz_il_handler_var().
RZ_API RZ_OWN RzILEvent* rz_il_event_var_write_new | ( | RZ_NONNULL const char * | name, |
RZ_NULLABLE const RzILVal * | old_v, | ||
RZ_NONNULL const RzILVal * | new_v | ||
) |
Creates an RzILEvent of type RZ_IL_EVENT_VAR_WRITE
name | register name that has changed |
old_v | old value before the change |
new_v | new value after the change |
Definition at line 177 of file il_events.c.
References rz_il_vm_event_t::data, rz_il_vm_event_var_write_t::new_value, NULL, rz_il_vm_event_var_write_t::old_value, rz_il_event_free(), RZ_IL_EVENT_VAR_WRITE, rz_il_value_dup(), RZ_NEW, rz_return_val_if_fail, strdup(), rz_il_vm_event_t::type, rz_il_vm_event_t::var_write, and rz_il_vm_event_var_write_t::variable.
Referenced by il_event_new_write_from_var().