Skip to content

Commit

Permalink
Set "asm.arch" before the call to SleighIDFromCore
Browse files Browse the repository at this point in the history
    * This way, the `strcmp` check in `SleighIDFromCore` function
      results as true, and in the corresponding branch, we extract the
      correct architecture using `SleighIdFromSleighAsmConfig`
  • Loading branch information
DMaroo committed Sep 26, 2023
1 parent 85674a4 commit 71f142f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core_ghidra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71f142f

Please sign in to comment.