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:
parent
61d0e9b94a
commit
6b91c2564f
@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
## Building
|
||||
|
||||
|
BIN
media/decomp_muladd.png
Normal file
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user