// 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); } }