I am using Ghidra and when clicking for example in the decompile window on a specific raw, it change the cursor in the assembly window to the exact location in the assembly. Is there any option to do this using Ghidra scripting ?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
If you want instruction access references to a particular variable, then first define the reference manager:
refmanager = program.referenceManager
Then lets say you get all the local variables of a particular function - using -
vars = function.getLocalVariables()
You can get references to a particular variable:
for var in vars: for ref in refmanager.getReferencesTo(var): print(ref)