From 71f142fef442405c154e4f4c378c6cc47a2dba2d Mon Sep 17 00:00:00 2001 From: Dhruv Maroo Date: Wed, 20 Sep 2023 03:40:49 +0530 Subject: [PATCH] Set "asm.arch" before the call to `SleighIDFromCore` * This way, the `strcmp` check in `SleighIDFromCore` function results as true, and in the corresponding branch, we extract the correct architecture using `SleighIdFromSleighAsmConfig` --- src/core_ghidra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_ghidra.cpp b/src/core_ghidra.cpp index a426a06e..7d3f7418 100644 --- a/src/core_ghidra.cpp +++ b/src/core_ghidra.cpp @@ -474,10 +474,10 @@ static void PrintAutoSleighLang(RzCore *core) static void EnablePlugin(RzCore *core) { + rz_config_set(core->config, "asm.arch", "ghidra"); auto id = SleighIdFromCore(core); rz_config_set(core->config, "ghidra.lang", id.c_str()); rz_config_set(core->config, "asm.cpu", id.c_str()); - rz_config_set(core->config, "asm.arch", "ghidra"); } bool SleighHomeConfig(void */* user */, void *data)