[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
+6 -2
View File
@@ -342,8 +342,12 @@ TEST_F(DataDecompTest, FloatArray) {
" .word 0x0\n"
" .word 0x3f800000\n\n";
auto parsed = parse_data(input);
auto decomp = decompile_at_label_with_hint({"(pointer float)", true, 7}, parsed.label("L63"),
parsed.labels, {parsed.words}, *dts, nullptr);
LabelInfo info;
info.result_type = TypeSpec("pointer", {TypeSpec("float")});
info.array_size = 7;
info.is_value = false;
auto decomp = decompile_at_label_with_hint(info, parsed.label("L63"), parsed.labels,
{parsed.words}, *dts, nullptr);
check_forms_equal(decomp.print(),
"(new 'static 'array float 7\n"
"1.0 0.0 1.0 0.0 1.0 0.0 1.0)");