forked from tsuki/openroller
Initial public source release
Split reusable rendering and format support into vectorail-core and vectorail-gc.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// GhidraScript: FindAddressRefs.java
|
||||
// Usage: ... -postScript FindAddressRefs.java 0x401000 [...]
|
||||
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Function;
|
||||
import ghidra.program.model.symbol.Reference;
|
||||
|
||||
public class FindAddressRefs extends GhidraScript {
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
for (String arg : getScriptArgs()) {
|
||||
Address target = toAddr(Long.decode(arg));
|
||||
println("================================================================================");
|
||||
println("target: " + target);
|
||||
Reference[] refs = getReferencesTo(target);
|
||||
println("refs: " + refs.length);
|
||||
for (Reference ref : refs) {
|
||||
Address from = ref.getFromAddress();
|
||||
Function function = getFunctionContaining(from);
|
||||
println(" " + from + " -> " +
|
||||
(function == null ? "(no function)" :
|
||||
function.getName() + " @ " + function.getEntryPoint()) +
|
||||
" type=" + ref.getReferenceType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user