25 RzILTraceInstruction *instruction_trace =
RZ_NEW0(RzILTraceInstruction);
26 if (!instruction_trace) {
31 instruction_trace->addr =
addr;
38 if (!(instruction_trace->read_reg_ops &&
39 instruction_trace->read_mem_ops &&
40 instruction_trace->write_reg_ops &&
41 instruction_trace->write_mem_ops)) {
46 return instruction_trace;
71 if (!(trace &&
mem)) {
80 switch (
mem->behavior) {
81 case RZ_IL_TRACE_OP_WRITE:
83 trace->stats |= RZ_IL_TRACE_INS_HAS_MEM_W;
85 case RZ_IL_TRACE_OP_READ:
87 trace->stats |= RZ_IL_TRACE_INS_HAS_MEM_R;
103 if (!(trace &&
reg)) {
112 switch (
reg->behavior) {
113 case RZ_IL_TRACE_OP_WRITE:
115 trace->stats |= RZ_IL_TRACE_INS_HAS_REG_W;
117 case RZ_IL_TRACE_OP_READ:
119 trace->stats |= RZ_IL_TRACE_INS_HAS_REG_R;
141 RzILTraceMemOp *mem_op;
143 case RZ_IL_TRACE_OP_WRITE:
144 mem_ops = trace->write_mem_ops;
146 case RZ_IL_TRACE_OP_READ:
147 mem_ops = trace->read_mem_ops;
157 if (mem_op->addr ==
addr) {
178 RzILTraceRegOp *reg_op;
180 case RZ_IL_TRACE_OP_WRITE:
181 reg_ops = trace->write_reg_ops;
183 case RZ_IL_TRACE_OP_READ:
184 reg_ops = trace->read_reg_ops;
194 if (strcmp(reg_op->reg_name,
regname) == 0) {
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RzILTraceMemOp * rz_analysis_il_get_mem_op_trace(RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type)
RZ_API bool rz_analysis_il_mem_trace_contains(RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type)
RZ_API RzILTraceInstruction * rz_analysis_il_trace_instruction_new(ut64 addr)
RZ_API bool rz_analysis_il_trace_add_mem(RzILTraceInstruction *trace, RzILTraceMemOp *mem)
RZ_API bool rz_analysis_il_reg_trace_contains(RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type)
RZ_API void rz_analysis_il_trace_instruction_free(RzILTraceInstruction *instruction)
RZ_API bool rz_analysis_il_trace_add_reg(RzILTraceInstruction *trace, RzILTraceRegOp *reg)
RZ_API RzILTraceRegOp * rz_analysis_il_get_reg_op_trace(RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type)
#define rz_warn_if_reached()
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API RzPVector * rz_pvector_new(RzPVectorFree free)
void(* RzPVectorFree)(void *e)
static void ** rz_pvector_push(RzPVector *vec, void *x)
RZ_API void rz_pvector_free(RzPVector *vec)
#define rz_pvector_foreach(vec, it)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static char * regname(int reg)