mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-30 12:03:54 +02:00
28 lines
925 B
Java
28 lines
925 B
Java
// Report basic analysis stats for a TMS34010 program.
|
|
//@category VT1200
|
|
|
|
import ghidra.app.script.GhidraScript;
|
|
import ghidra.program.model.listing.Instruction;
|
|
import ghidra.program.model.listing.InstructionIterator;
|
|
|
|
public class StatsTMS34010 extends GhidraScript {
|
|
|
|
@Override
|
|
public void run() throws Exception {
|
|
println("=== " + currentProgram.getName()
|
|
+ " [" + currentProgram.getLanguageID() + "]");
|
|
println(" functions : " + currentProgram.getFunctionManager().getFunctionCount());
|
|
|
|
long count = 0;
|
|
InstructionIterator it = currentProgram.getListing().getInstructions(true);
|
|
while (it.hasNext()) {
|
|
Instruction ins = it.next();
|
|
count++;
|
|
if (count <= 3) {
|
|
println(" first insn : " + ins.getAddress() + ": " + ins);
|
|
}
|
|
}
|
|
println(" instructions : " + count);
|
|
}
|
|
}
|