decomp: output mips2c method/function declarations to the _disasm.gc file (#2054)

When working with mips2c recently, I noticed adding the
`defmethod-mips2c` or `def-mips2c` code was a manual step. This is a bit
tedious to have to go and do yourself, but more importantly you have to
manually go and find the right spot in the source file else you might be
declaring it too early or too late.

This will automatically output the declaration for methods, and a
half-finished comment for the functions. I wasn't able to fully output
the function one because it seems the signature info from `all-types`
doesn't make it all the way through -- but maybe I'm wrong or this is an
easy fix?
This commit is contained in:
Tyler Wilding
2022-12-30 12:03:06 -05:00
committed by GitHub
parent fb11c162c1
commit 6181c6c997
34 changed files with 443 additions and 120 deletions
@@ -1057,7 +1057,9 @@ std::string ObjectFileDB::ir2_function_to_string(ObjectFileData& data, Function&
}
if (func.mips2c_output) {
result += ";;-*-MIPS2C-Start-*-\n";
result += *func.mips2c_output;
result += ";;-*-MIPS2C-End-*-\n";
}
result += "\n";