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

Better names for output files generated by RetDec #132

Closed
PeterMatula opened this issue Jan 31, 2018 · 2 comments
Closed

Better names for output files generated by RetDec #132

PeterMatula opened this issue Jan 31, 2018 · 2 comments

Comments

@PeterMatula
Copy link
Collaborator

Decompilation of file ackermann.elf produces the following files:

ackermann.c
ackermann.c.backend.bc
ackermann.c.backend.ll
ackermann.c.frontend.dsm
ackermann.c.json

These name patterns are historic and have several problems:

  • *backend* files are not generated by backend.
  • ackermann.c.frontend.dsm should be on the same level as output C, so frontend suffix should not be generated.
  • We are dropping .elf suffix in our scripts, this is not really useful.
  • If ackermann.elf was compiled from ackermann.c, then decompilation will overwrite this file.

Think up a better system and implement it.

@PeterMatula
Copy link
Collaborator Author

New design:

  • No suffix magic, just append our suffixes to the original name. E.g. input.whatever -> input.whatever.<our_suffix>.
  • We generate 5 outputs with 5 different suffixes. For input.exe it would be:
    • input.exe.c - main output - decompiled C source
    • input.exe.dsm - disassembly (generated in bin2llvmir)
    • input.exe.bc- LLVM bit code (output of bin2llvmir)
    • input.exe.ll - LLVM IR (output of bin2llvmir)
    • input.exe.json - RetDec JSON config

PeterMatula added a commit to avast/retdec-regression-tests-framework that referenced this issue Aug 28, 2018
@PeterMatula
Copy link
Collaborator Author

Implemented as designed in the next branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant