uxmal / reko

Reko is a binary decompiler.

Home Page:https://uxmal.github.io/reko

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Save results of analysis to disk after scanning

throwaway96 opened this issue · comments

Scanning can take a long time, so storing the outcome would be desirable.

I think a good compromise is to save the interprocedural control flow graph (ICFG) after the scanning has been completed. That way, when reloading a program, Reko only has to disassemble/rewrite the blocks without having to perform actual scanning. This could probably be parallelized for great speed.

Saving would store the properties of all Procedures and Blocks in a file. Each procedure would save the graph of addresses of the blocks that it consists of. Each block would save its start address and its length in memory units (read: bytes on most CPUs).

When loading, the skeleton of the ICFG would be created by loading all the procedures' and blocks' data from the file. Empty procedures and blocks would be created, complete with the graph structure. Then, the contents of the blocks would be read, using as many threads as possible in parallel. Since basic blocks are independent of each other, there would be no contention.

It's probably valuable to create a prototype to measure how much this would speed up loading files.