[decompiler] automatically label things when possible (#784)

* improve label system

* clean up menu

* debug menu working, still need to fix tests

* fix tests and clean up
This commit is contained in:
water111
2021-08-29 11:13:06 -04:00
committed by GitHub
parent 24fe2c78c0
commit d9f9e076af
54 changed files with 11632 additions and 2950 deletions
+9
View File
@@ -145,6 +145,15 @@ std::unique_ptr<FormRegressionTest::TestData> FormRegressionTest::make_function(
test->add_string_at_label(str.first, str.second);
}
// set up LabelDB:
test->file.label_db = std::make_unique<LabelDB>(
std::unordered_map<std::string, LabelConfigInfo>{}, test->file.labels, *dts);
for (auto& str : settings.strings) {
test->file.label_db->set_and_get_previous(test->file.label_db->get_index_by_name(str.first),
TypeSpec("string"), false, {});
}
// find basic blocks
test->func.basic_blocks = find_blocks_in_function(test->file, 0, test->func);
// analyze function prologue/epilogue