Rizin
unix-like reverse engineering framework and cli tools
|
list of types of events that can happen on the VM More...
#include <rz_il/definitions/definitions.h>
Go to the source code of this file.
Classes | |
struct | rz_il_vm_event_mem_read_t |
struct | rz_il_vm_event_var_read_t |
struct | rz_il_vm_event_pc_write_t |
struct | rz_il_vm_event_mem_write_t |
struct | rz_il_vm_event_var_write_t |
struct | rz_il_vm_event_t |
Typedefs | |
typedef enum rz_il_event_id_t | RzILEventId |
typedef struct rz_il_vm_event_mem_read_t | RzILEventMemRead |
typedef struct rz_il_vm_event_var_read_t | RzILEventVarRead |
typedef struct rz_il_vm_event_pc_write_t | RzILEventPCWrite |
typedef struct rz_il_vm_event_mem_write_t | RzILEventMemWrite |
typedef struct rz_il_vm_event_var_write_t | RzILEventVarWrite |
typedef struct rz_il_vm_event_t | RzILEvent |
Enumerations | |
enum | rz_il_event_id_t { RZ_IL_EVENT_EXCEPTION = 0 , RZ_IL_EVENT_PC_WRITE , RZ_IL_EVENT_MEM_READ , RZ_IL_EVENT_VAR_READ , RZ_IL_EVENT_MEM_WRITE , RZ_IL_EVENT_VAR_WRITE } |
list of types of events that can happen on the VM
Definition in file rz_il_events.h.
typedef struct rz_il_vm_event_t RzILEvent |
typedef enum rz_il_event_id_t RzILEventId |
typedef struct rz_il_vm_event_mem_read_t RzILEventMemRead |
typedef struct rz_il_vm_event_mem_write_t RzILEventMemWrite |
typedef struct rz_il_vm_event_pc_write_t RzILEventPCWrite |
typedef struct rz_il_vm_event_var_read_t RzILEventVarRead |
typedef struct rz_il_vm_event_var_write_t RzILEventVarWrite |
enum rz_il_event_id_t |
Enumerator | |
---|---|
RZ_IL_EVENT_EXCEPTION | |
RZ_IL_EVENT_PC_WRITE | |
RZ_IL_EVENT_MEM_READ | |
RZ_IL_EVENT_VAR_READ | |
RZ_IL_EVENT_MEM_WRITE | |
RZ_IL_EVENT_VAR_WRITE |
Definition at line 19 of file rz_il_events.h.
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 void rz_il_event_json | ( | RZ_NONNULL RzILEvent * | evt, |
RZ_NONNULL PJ * | pj | ||
) |
Definition at line 797 of file il_export.c.
References free(), NULL, pj_end(), pj_ks(), pj_o(), rz_bv_as_hex_string(), 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_stringify(), rz_return_if_fail, and rz_warn_if_reached.
Referenced by rz_core_analysis_il_step_with_events().
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 void rz_il_event_stringify | ( | RZ_NONNULL const RzILEvent * | evt, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Create a readable string representation of evt
Definition at line 753 of file il_export.c.
References free(), NULL, rz_bv_as_hex_string(), 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_stringify(), rz_return_if_fail, rz_strbuf_append(), rz_strbuf_appendf(), rz_warn_if_reached, and sb.
Referenced by rz_core_analysis_il_step_with_events().
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().