|
|
|
|
|
by StilesCrisis
75 days ago
|
|
Working on a decomp hobby project now, and "100% matching" on an individual function can be so deceptive! These two functions could look identical in assembly: void foo() { bar(); } int foo(int x, float y) { return bar(x, y); } This is because parameter-passing and return-value handling can sometimes be done in zero instructions in PPC, if the values are already in the right registers. So you need to continually go back and reassess old functions once you learn the signatures of newer ones! |
|
There are plenty of examples where two very semantically different source codes can have the same output, which is really counter-intuitive when combined with the difficulty that often comes with trying to find a single source code that does match.
This is just another reason why debug information is such a godsend; having symbol names for C++ code will usually give you most of the function signature, and type information will give you the rest. That greatly enriches the disassembly, and the automated decompilation output, and no doubt constrains the number of possible source codes that could match both the output and the debug information, somewhat alleviating this issue.