Ghidra 10.0 support
Closed this issue · 2 comments
Ghidra 10 will release very soon, and it has some radical changes to the Pcode injection stuff, so bitrot in ghidra-emotionengine sets in:
- Ghidra 9.1.2: https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_9.1.2_build/Ghidra/Processors/JVM/src/main/java/ghidra/app/util/pcodeInject/InjectPayloadJava.java (this is roughly what ghidra-emotionengine uses in InjectPayloadVu.java)
- Ghidra 9.2.4: https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_9.2.4_build/Ghidra/Processors/JVM/src/main/java/ghidra/app/util/pcodeInject/InjectPayloadJava.java (still compatible with ghidra-emotionengine)
- Ghidra 10.0: https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_10.0/Ghidra/Processors/JVM/src/main/java/ghidra/app/util/pcodeInject/InjectPayloadJava.java (no longer compatible with ghidra-emotionengine, API use broke)
Some changes which have to do with this (5 minute job of git blame; but I have no idea what I'm doing, because the Ghidra codebase is so convoluted):
- NationalSecurityAgency/ghidra@a5d4ca3
- NationalSecurityAgency/ghidra@9c2ce9b
- NationalSecurityAgency/ghidra@ed82c2c
Motivation
Ghidra 10 has a couple of killer features:
- Better re-export of ELF files
- Support for
for-loop
in decompiler - Support for new gradle versions
- Better SLEIGH emulation interface
- Tracing and debugging
I'll take a look and have this fixed before Ghidra 10.0 is fully released. Specifically this weekend or sooner.
I have considered writing a python script to just generate the sleigh for the vector instructions. This would fix #45 as well. I may take that route and do away with the pcode injection as I don't think this was its intended use case.
I found it easier to update the current implementation. Doing away with the pcode injection can come at a later time. What branch should this go in since Ghidra 10.0 is not finalized yet?