Make decompiler naming consistent (#94)

* use a fixed object file naming by default, option to allow new map file creation

* fix prints

* fixing up edge cases

* update json config
This commit is contained in:
water111
2020-10-24 14:27:50 -04:00
committed by GitHub
parent 0bc2466f86
commit b561cdfade
14 changed files with 757 additions and 426 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
#include <cassert>
#include <vector>
#include "Function.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
#include "decompiler/Disasm/InstructionMatching.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "decompiler/util/DecompilerTypeSystem.h"
@@ -89,8 +90,8 @@ void Function::analyze_prologue(const LinkedObjectFile& file) {
// storing s7 on the stack is done by interrupt handlers, which we probably don't want to
// support
if (instr.kind == InstructionKind::SD && instr.get_src(0).get_reg() == make_gpr(Reg::S7)) {
printf("[Warning] %s Suspected ASM function based on this instruction in prologue: %s\n",
guessed_name.to_string().c_str(), instr.to_string(file).c_str());
spdlog::warn("{} Suspected ASM function based on this instruction in prologue: {}\n",
guessed_name.to_string(), instr.to_string(file));
warnings += "Flagged as ASM function because of " + instr.to_string(file) + "\n";
suspected_asm = true;
return;