1- /* radare - LGPL - Copyright 2014-2024 - pancake, condret */
1+ /* radare - LGPL - Copyright 2014-2025 - pancake, condret */
22
33#include <r_esil.h>
44
5- static void esil_stats_old (REsil * esil , bool enable );
6-
75#if USE_NEW_ESIL
86static void stats_voyeur_reg_read (void * user , const char * name , ut64 val ) {
97 const char * key = (* name >='0' && * name <='9' )? "num.load" : "reg.read" ;
@@ -25,6 +23,8 @@ static void stats_voyeur_mem_write (void *user, ut64 addr, const ut8 *old, const
2523static void stats_voyeur_op (void * user , const char * op ) {
2624 sdb_array_add ((Sdb * )user , "ops.list" , op , 0 );
2725}
26+ #else
27+ static void esil_stats_old (REsil * esil , bool enable );
2828#endif
2929
3030R_API void r_esil_stats (REsil * esil , REsilStats * stats , bool enable ) {
@@ -65,6 +65,9 @@ R_API void r_esil_stats(REsil *esil, REsilStats *stats, bool enable) {
6565#endif
6666}
6767
68+ #if USE_NEW_ESIL
69+ //
70+ #else
6871static bool hook_command (REsil * esil , const char * op ) {
6972 sdb_array_add (esil -> stats , "ops.list" , op , 0 );
7073 return false;
@@ -90,6 +93,7 @@ static bool hook_reg_write(REsil *esil, const char *name, ut64 *val) {
9093 sdb_array_add (esil -> stats , "reg.write" , name , 0 );
9194 return false;
9295}
96+ #endif
9397
9498static bool hook_NOP_mem_write (REsil * esil , ut64 addr , const ut8 * buf , int len ) {
9599 eprintf ("NOP WRITE AT 0x%08" PFMT64x "\n" , addr );
@@ -104,7 +108,8 @@ R_API void r_esil_mem_ro(REsil *esil, bool mem_readonly) {
104108 }
105109}
106110
107- #if MYUNUSED
111+ #if USE_NEW_ESIL
112+ #else
108113static void esil_stats_old (REsil * esil , bool enable ) {
109114 if (enable ) {
110115 if (esil -> stats ) {
0 commit comments