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

Decompiler example is out of date #1354

Open
user1342234 opened this issue Feb 2, 2025 · 1 comment
Open

Decompiler example is out of date #1354

user1342234 opened this issue Feb 2, 2025 · 1 comment

Comments

@user1342234
Copy link

user1342234 commented Feb 2, 2025

Hello!

In the user-guide the method; "DecompilerDriver" does not exist anymore. I'm currently trying to load a binary to perform analysis on a single function. Is there a "formal" way of doing this using reko? Also, do we need to auto-generate the XML docs ourselves or are they hosted somewhere?

@uxmal
Copy link
Owner

uxmal commented Feb 2, 2025

Hello, and thanks for reporting the broken sample. I will be update it shortly.

Currently, Reko implements two modes of analysis. The first one is recursive traversal of the binary; starting at the entry points of the program image, start searching for calls and jumps. Calls trigger the generation of Procedures. The process continues until no more jumps remain to process and no more Procedures are found.

The second mode of analysis is more heuristic and can generate false positives. The inventors of the technique call it "shingle scanning". The analysis sweeps through memory areas and disassembles them regardless of whether the memory is actually valid code or not. A later part of the analysis attempts to build a "soup" of basic blocks, and from the soup of basic blocks control flow graphs.

Reko can be pointed to a specific address and told: please analyze the procedure whose entry point is at the following address.
Currently Reko will perform the analysis of that procedure, but also all procedures that the procedure calls, and the procedure those call, etc. If you point Reko at your program's main, you will get a whole program analysis. If your procedure is a leaf procedure or one with a shallow call tree, this shouldn't be a problem.

If you truly want to isolate the procedure in question and not look at the code that it calls, then there is no direct support for it at this time. However, I'm more than happy to discuss with you what would be needed to make Reko conform to this single-procedure mode, either here on github or on the discord server (see the README.md).

As for XML documentation, currently it is not automatically generated by the build process. If you are already building XML comments from .NET projects, perhaps you could send a few pointers, and I could extend Reko's build process to also generate documentation in some format (ideally not involving node.js and megabytes of cruft).

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

No branches or pull requests

2 participants