![]() |
#1
|
|||
|
|||
IDA Ghidra decompiler plugin source code release
There are still a good number of cleanup tasks for things like building on Linux, building on 32-bit systems, moving every path variable for bison or libraries to a single unified place.
This was built with an older Ghidra release not the current one and contains some special customizations of the sleigh source that it is built with by necessity as the P-code parser portion is a necessity. Otherwise the decompiler itself is communicated with via the interface that the Java frontend uses in Ghidra. My focus was on 16-bit code so a lot of special details dealing with both IDA and Ghidra for these cases are built in for handling them. There are no good 16-bit decompilers in existence. But the concept of Ghidra which requires parameter identification before the decompilation pass was in the works and never completely finished. The code is somewhat staged to do it though. You can browser or download the source here: https://github.com/GregoryMorse/GhidraDec GhidraDec project is the main project as the others were test projects, or projects to test total decompiler integration. Ideally a build variable should allow building against the full decompiler, as well as the current separate binary approach. For technical design reasons, its definitely better to leave the decompiler as a separate process, Ghidra may have had to do it do to use of Java, but there are other reasons dealing with processes and threads and stability and memory leaks, crashes or hangs. |
The Following User Gave Reputation+1 to chants For This Useful Post: | ||
yoza (05-08-2020) |
#2
|
|||
|
|||
Is this your own work or are you just sharing it with us? I ask since the source was available online from the past 9 months on github...
Is this the same as the one here: Quote:
![]() Last edited by SegWolf; 04-29-2020 at 19:54. |
#3
|
|||
|
|||
It is my own work, it was kept in a private repo. For the sake of continuation of the project while its still relevant, I had it made public. I simply have not had time to work on remaining parts. It is basically a mess of technical details mostly on the IDA database side, that requires a lot of testing.
The decompiler.cpp/h and sleighinterface.cpp/h contain all of the crucial code. I am not sure if its forward compatible or not, but as long as the protocol between the decompiler and UI did not change, and as long as the sleigh classes did not have any major changes, it should be. A lot was done including trying to make all typedefs, minimal function declarations which are needed, forward/initialized/uninitialized data definitions, in the right order including dealing with circular references and such. A lot of recursive functions were eliminated using STL stacks, to allow for unlimited depth without stack overflows in this regard. |
#4
|
|||
|
|||
Quote:
As you know, I do not have the private message privileges yet ![]() |
#5
|
|||
|
|||
Quote:
I really wonder if by some magic magic, this (not full capacity obv) could be made for x64dbg. Cheers chants! |
#6
|
|||
|
|||
I wish I also had private message privileges for my questions too.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
DeDe (delphi decompiler) 3.10 Source Code Ported for Berlin 10.1 | ReBirth | Source Code | 12 | 03-03-2020 13:56 |
VB6 N-CODE - Stop any servive and Start any APP-Release and Source Code | wilson bibe | General Discussion | 5 | 04-10-2013 00:23 |