From 307075dc397ab2b5409a5bf63eb9c6734c3c2b3a Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 25 Nov 2020 16:31:26 +0100 Subject: [PATCH] Fallback to anal.arch=v850 when using asm.arch=v850.gnu ##anal --- libr/core/cconfig.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libr/core/cconfig.c b/libr/core/cconfig.c index aeb948e96b..b2b62aaaed 100644 --- a/libr/core/cconfig.c +++ b/libr/core/cconfig.c @@ -376,6 +376,16 @@ static bool cb_analarch(void *user, void *data) { if (r_anal_use (core->anal, node->value)) { return true; } + char *p = strchr (node->value, '.'); + if (p) { + char *arch = strdup (node->value); + arch[p - node->value] = 0; + free (node->value); + node->value = arch; + if (r_anal_use (core->anal, node->value)) { + return true; + } + } const char *aa = r_config_get (core->config, "asm.arch"); if (!aa || strcmp (aa, node->value)) { eprintf ("anal.arch: cannot find '%s'\n", node->value);