[decompiler] implement defskelgroup (#955)

* implement `defskelgroup` in decompiler

0 lines removed!

* clang

* fix matcher code

* it was fine actually

* update all files (pt 1)

* update all files

* remaining fixes!

* null deref

* use METER_LENGTH

* move max lod warning

* clang

* math error

* fix macros too

* fix bug in a print
This commit is contained in:
ManDude
2021-11-04 23:10:39 +00:00
committed by GitHub
parent 6a606d7222
commit 2ea2d6a58a
160 changed files with 2347 additions and 4665 deletions
@@ -22,6 +22,7 @@
#include "decompiler/analysis/stack_spill.h"
#include "decompiler/analysis/static_refs.h"
#include "decompiler/analysis/symbol_def_map.h"
#include "decompiler/analysis/find_skelgroups.h"
#include "common/goos/PrettyPrinter.h"
#include "decompiler/IR2/Form.h"
#include "decompiler/analysis/mips2c.h"
@@ -64,6 +65,13 @@ void ObjectFileDB::analyze_functions_ir2(
} catch (const std::exception& e) {
lg::error("Failed to find defstates: {}", e.what());
}
try {
if (data.linked_data.functions_by_seg.size() == 3) {
run_defskelgroups(data.linked_data.functions_by_seg.at(2).front());
}
} catch (const std::exception& e) {
lg::error("Failed to find defskelgroups: {}", e.what());
}
ir2_do_segment_analysis_phase2(DEBUG_SEGMENT, config, data);
ir2_do_segment_analysis_phase2(MAIN_SEGMENT, config, data);