Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Boomerang Output Compilable #223

Open
humanitiesclinic opened this issue Apr 30, 2019 · 2 comments
Open

Is Boomerang Output Compilable #223

humanitiesclinic opened this issue Apr 30, 2019 · 2 comments
Labels
type: support (I) Q&A about how to use Boomerang

Comments

@humanitiesclinic
Copy link

humanitiesclinic commented Apr 30, 2019

Is Boomerang Output Compilable? If no, is the output still standard C, and which version of the standard does it follow, if yes? Also, how can I manually make the decompiled code compilable and make sure the new executable does the same thing as the original one (not necessarily make it exactly the same binary, just perform the same thing / have the same effect, maybe with some performance differences.)

Will be nice if there was a tutorial for this, which will also be useful for someone who is not really interested in compiling back the decompiled code, as they can use it to understand the differences between compilable C and the decompiled code.

@humanitiesclinic
Copy link
Author

Any suggestions?

@ceeac ceeac added the type: support (I) Q&A about how to use Boomerang label Apr 30, 2019
@ceeac
Copy link
Member

ceeac commented Apr 30, 2019

No, the output of Boomerang is generally not compilable, except for some trivial corner cases. You can have a look at the output of Boomerang for some simple programs in the tests/regression-tests/expected-outputs/ directory. Think of it as pseudo-code that happens to be close to C (for some definition of "close").

As for correctness, this is currently not extensively tested. The best way to approach this is using a disassembly viewer and the decompiler output side-by-side and refactoring the decompiler output into compilable C while watching out for semantic differences between disassembly and decompiler output. Boomerang currently does not have a disassembly viewer so you have to use external tools for that. In any case, lots of manual labour will be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: support (I) Q&A about how to use Boomerang
Projects
None yet
Development

No branches or pull requests

2 participants