[Decompiler] Stack Variables (#338)

* clean up type analysis

* get everything set up

* basic stack variables working

* partial load fix

* most of matrix

* add offline tests
This commit is contained in:
water111
2021-03-27 15:18:59 -04:00
committed by GitHub
parent 7fac11ddf5
commit 64c35ca453
44 changed files with 4223 additions and 387 deletions
+9
View File
@@ -3,6 +3,7 @@
#include "third-party/fmt/core.h"
#include "common/util/FileUtil.h"
#include "common/util/json_util.h"
#include "decompiler/util/config_parsers.h"
namespace decompiler {
Config gConfig;
@@ -151,5 +152,13 @@ void set_config(const std::string& path_to_config_file) {
}
}
}
auto stack_vars_json = read_json_file_from_config(cfg, "stack_vars_file");
for (auto& kv : stack_vars_json.items()) {
auto& func_name = kv.key();
auto& stack_vars = kv.value();
gConfig.stack_var_hints_by_function[func_name] = parse_stack_var_hints(stack_vars);
}
}
} // namespace decompiler