Rizin
unix-like reverse engineering framework and cli tools
|
new rizin IL trace implementation More...
Go to the source code of this file.
Functions | |
RZ_API RzILTraceInstruction * | rz_analysis_il_trace_instruction_new (ut64 addr) |
RZ_API void | rz_analysis_il_trace_instruction_free (RzILTraceInstruction *instruction) |
RZ_API bool | rz_analysis_il_trace_add_mem (RzILTraceInstruction *trace, RzILTraceMemOp *mem) |
RZ_API bool | rz_analysis_il_trace_add_reg (RzILTraceInstruction *trace, RzILTraceRegOp *reg) |
RZ_API RzILTraceMemOp * | rz_analysis_il_get_mem_op_trace (RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type) |
RZ_API RzILTraceRegOp * | rz_analysis_il_get_reg_op_trace (RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type) |
RZ_API bool | rz_analysis_il_mem_trace_contains (RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type) |
RZ_API bool | rz_analysis_il_reg_trace_contains (RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type) |
new rizin IL trace implementation
provide operations to new IL trace structure to record the memory changes and register changes. TODO : Should be moved to librz/il after integrations with new IL : should move the prototypes and trace structure to new header, too prototypes in <rz_analysis.h> Used by : analysis_tp.c, debug/trace.c
Definition in file il_trace.c.
RZ_API RzILTraceMemOp* rz_analysis_il_get_mem_op_trace | ( | RzILTraceInstruction * | trace, |
ut64 | addr, | ||
RzILTraceOpType | op_type | ||
) |
Find the memory change in an instruction by given address
trace | RzILTraceInstruction *, instruction trace |
addr | ut64, memory address |
is_write | bool, true if you want to find a write operation to address, else find a read operation |
Definition at line 135 of file il_trace.c.
References addr, NULL, rz_pvector_foreach, and rz_warn_if_reached.
Referenced by rz_analysis_il_mem_trace_contains().
RZ_API RzILTraceRegOp* rz_analysis_il_get_reg_op_trace | ( | RzILTraceInstruction * | trace, |
const char * | regname, | ||
RzILTraceOpType | op_type | ||
) |
Find the register change in an instruction by register name
trace | RzILTraceInstruction *, instruction trace |
regname | const char *, name of register |
is_write | bool, true if you want to find a write operation to register, else find a read operation |
Definition at line 172 of file il_trace.c.
References NULL, regname(), rz_pvector_foreach, and rz_warn_if_reached.
Referenced by get_addr(), rz_analysis_il_reg_trace_contains(), and type_match().
RZ_API bool rz_analysis_il_mem_trace_contains | ( | RzILTraceInstruction * | trace, |
ut64 | addr, | ||
RzILTraceOpType | op_type | ||
) |
Check if instruction contains a read/write to given address
trace | RzILTraceInstruction *, instruction trace |
addr | ut64, Address of memory |
is_write | bool, set true to find if it contains a write to address, else read |
Definition at line 209 of file il_trace.c.
References addr, rz_analysis_il_get_mem_op_trace(), and true.
Referenced by rz_analysis_il_trace_add_mem().
RZ_API bool rz_analysis_il_reg_trace_contains | ( | RzILTraceInstruction * | trace, |
const char * | regname, | ||
RzILTraceOpType | op_type | ||
) |
Check if instruction contains a read/write to given register
trace | RzILTraceInstruction *, instruction trace |
regname | const char *, name of register |
is_write | bool, set true to find if it contains a write to the register, else read |
Definition at line 220 of file il_trace.c.
References regname(), rz_analysis_il_get_reg_op_trace(), and true.
Referenced by rz_analysis_il_trace_add_reg(), and type_pos_hit().
add memory change to an instruction trace
trace | RzILTraceInstruction *, trace of instruction which triggers a memory change |
mem | RzILTraceMemOp *, info of memory change |
Definition at line 70 of file il_trace.c.
References mem, rz_analysis_il_mem_trace_contains(), rz_pvector_push(), and rz_warn_if_reached.
Referenced by esil_add_mem_trace().
add register change to an instruction trace
trace | RzILTraceInstruction *, trace of instruction which triggers a register change |
mem | RzILTraceRegOp *, info of register change |
Definition at line 102 of file il_trace.c.
References reg, rz_analysis_il_reg_trace_contains(), rz_pvector_push(), and rz_warn_if_reached.
Referenced by esil_add_reg_trace().
RZ_API void rz_analysis_il_trace_instruction_free | ( | RzILTraceInstruction * | instruction | ) |
clean an IL trace
instruction | RzILTraceInstruction, trace to be cleaned |
Definition at line 53 of file il_trace.c.
References free(), and rz_pvector_free().
Referenced by rz_analysis_esil_trace_new(), rz_analysis_il_trace_instruction_new(), rz_analysis_rzil_trace_new(), and rz_cmd_debug_traces_esil_delete_handler().
create and init a trace structure for an instruction at address
addr | ut64, address of instruction |
Definition at line 24 of file il_trace.c.
References addr, free(), NULL, rz_analysis_il_trace_instruction_free(), RZ_LOG_ERROR, RZ_NEW0, and rz_pvector_new().
Referenced by rz_analysis_esil_trace_op().