From d83aebe94f707aa63fea4fbb9886d824bd5caa85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergi=20=C3=80lvarez=20i=20Capilla?= Date: Wed, 12 Jan 2022 12:20:35 +0100 Subject: [PATCH] Rename config var anal.detectwrites -> anal.onchange --- libr/core/agraph.c | 2 +- libr/core/cconfig.c | 2 +- libr/core/core.c | 2 +- test/db/anal/x86_64 | 2 +- test/db/cmd/write-fun | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libr/core/agraph.c b/libr/core/agraph.c index fab6697911..0fa44ab7f5 100644 --- a/libr/core/agraph.c +++ b/libr/core/agraph.c @@ -3512,7 +3512,7 @@ static int agraph_print(RAGraph *g, int is_interactive, RCore *core, RAnalFuncti static void check_function_modified(RCore *core, RAnalFunction *fcn) { if (r_anal_function_was_modified (fcn)) { - if (r_config_get_i (core->config, "anal.detectwrites") + if (r_config_get_i (core->config, "anal.onchange") || r_cons_yesno ('y', "Function was modified. Reanalyze? (Y/n)")) { r_anal_function_update_analysis (fcn); } diff --git a/libr/core/cconfig.c b/libr/core/cconfig.c index fa82cf98ef..8b5412585a 100644 --- a/libr/core/cconfig.c +++ b/libr/core/cconfig.c @@ -3320,7 +3320,7 @@ R_API int r_core_config_init(RCore *core) { SETI ("pdb.autoload", false, "Automatically load the required pdb files for loaded DLLs"); /* anal */ - SETBPREF ("anal.detectwrites", "false", "Automatically reanalyze function after a write"); + SETBPREF ("anal.onchange", "false", "Automatically reanalyze function if any byte has changed (EXPERIMENTAL)"); SETPREF ("anal.fcnprefix", "fcn", "Prefix new function names with this"); const char *analcc = r_anal_cc_default (core->anal); SETCB ("anal.cc", analcc? analcc: "", (RConfigCallback)&cb_analcc, "Specify default calling convention"); diff --git a/libr/core/core.c b/libr/core/core.c index 8cffe6615d..f735e81351 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -2795,7 +2795,7 @@ static int win_eprintf(const char *format, ...) { static void ev_iowrite_cb(REvent *ev, int type, void *user, void *data) { RCore *core = user; REventIOWrite *iow = data; - if (r_config_get_i (core->config, "anal.detectwrites")) { + if (r_config_get_i (core->config, "anal.onchange")) { // works, but loses varnames and such, but at least is not crashing char *cmd = r_str_newf ("af-0x%08"PFMT64x";af 0x%08"PFMT64x, iow->addr, iow->addr); r_list_append (core->cmdqueue, cmd); diff --git a/test/db/anal/x86_64 b/test/db/anal/x86_64 index f6ddc0809f..cdf3aea729 100644 --- a/test/db/anal/x86_64 +++ b/test/db/anal/x86_64 @@ -4107,7 +4107,7 @@ CMDS=<