0
0
mirror of https://github.com/DMaroo/GhidRust.git synced 2025-05-23 15:12:07 +02:00

Add better decompilation example's image in README

This commit is contained in:
Dhruv Maroo 2023-04-27 04:21:32 +05:30
parent 61d0e9b94a
commit 6b91c2564f
No known key found for this signature in database
GPG Key ID: 9ED1310EE7C2F034
4 changed files with 3 additions and 3 deletions

@ -38,7 +38,7 @@ This is a work-in-progress feature as of now. It requires parsing the decompiled
The decompiler panel can be accessed by clicking `GhidRust -> Open decompiler`. It looks as follows.
![](./media/return_0.png)
![](./media/decomp_muladd.png)
## Building

BIN
media/decomp_muladd.png Normal file

Binary file not shown.

After

(image error) Size: 100 KiB

Binary file not shown.

Before

(image error) Size: 30 KiB

@ -24,7 +24,7 @@ import java.awt.event.ActionEvent;
import docking.ComponentProvider;
import ghidra.util.task.ConsoleTaskMonitor;
import resources.ResourceManager;
import ghidrust.decompiler.parser.c.CFormatter;
import ghidrust.decompiler.parser.c.gen.CParser;
public class RustDecProvider extends ComponentProvider {
@ -136,7 +136,7 @@ public class RustDecProvider extends ComponentProvider {
String rust_code = "";
try {
rust_code = CParser.transpile(decompiled);
rust_code = CFormatter.format(CParser.transpile(decompiled));
} catch (Exception e) {
rust_code = "/* [!] Failed to transpile " + func.getName() + " */\n" + decompiled;
}