I want to find opcode using ghidra using headless. #3021
anzosasuke
started this conversation in
General
Replies: 1 comment 3 replies
-
Do you mean you want to find all instances of a specific instruction? If so you could brute force it with something like: def get_inst(mnemonic):
i = getFirstInstruction()
while i:
monitor.checkCanceled()
if i.getMnemonicString() == mnemonic:
yield i
i = getInstructionAfter(i) You could improve this by further filtering it by the pcodeop your instruction produces before checking if the mnemonic matches. Iirc there is an instruction search service but in headless mode there is no tool which means no way to get the service. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
II want to find opcode using ghidra headless. Is there any way to do that??
Beta Was this translation helpful? Give feedback.
All reactions