Add Ghidra apply-back support#120
Conversation
RobinDavid
left a comment
There was a problem hiding this comment.
Thanks for this awesome PR !
I have not tested it, but it looks great !
(Once my two small points are addressed we can merge !)
| help="IDA .i64 database or Ghidra .gpr/project directory to modify", | ||
| ) | ||
| @click.option( | ||
| "--ghidra-path", |
There was a problem hiding this comment.
Can we make it --disassembler-path so that we could also provide the path to IDA ? (if its not in the path nor in env vars). That could also apply later for Binary Ninja.
I would suggest to also change the main command to have this parameter rather than --ghidra-path.
| def commit( | ||
| self, | ||
| database_file: "Path|str|None" = None, | ||
| ida_path: "Path|str|None" = None, |
There was a problem hiding this comment.
Maybe we could merge ida_path and ghidra_path as a single parameter --disassembler_path.
One issue it raises is that we can't distinguish if we want to commit to IDA or Ghidra.
Thanksfully we store the Disassembler backend as metadata of the Quokka file so we can reuse that information to determine which disassembler to commit to given that we should commit ONLY on the same disassembler than the one used to generate the quokka file ! (disassemblers have too different ways to represent programs).
| def regenerate( | ||
| self, | ||
| database_file: "Path|str|None" = None, | ||
| ida_path: "Path|str|None" = None, |
|
|
||
| === "Ghidra headless" | ||
|
|
||
| Pass `--decompiled=true` to the Quokka headless script: |
There was a problem hiding this comment.
Nice you added the decompiled code support ?
Tested locally - and it works!