NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
49.09k stars 5.65k forks source link

Executing sleighCompile on processor plugin #6609

Closed shuffle2 closed 1 month ago

shuffle2 commented 1 month ago

I'm resuming work on a processor plugin I created a while ago. I have my sources in Ghidra\Processors\, next to the in-tree processor plugins. I'd really like to be able to just run the sleigh compiler on the code without needing to open ghidra and trigger the compilation by attempting to load a binary using my processor plugin.

Attempting gradle sleighCompile from my processor directory fails, as the task does not exist. Adding apply from: "$rootProject.projectDir/gradle/processorProject.gradle" to my build.gradle allows it to work.

I'm curious why this isn't included in the skeleton template build.gradle. Is there a different way to compile the sleigh code without adding the apply? In the past, I think it worked without adding this line (but I may be misremembering).

mumbel commented 1 month ago

If you're just working on slaspec (not pspec/cspec) you're looking for command line tool <ghidra_PUBLIC>/support/sleigh

(I use the latest public.zip' sleigh even while dev is in git)

shuffle2 commented 1 month ago

Thanks!