MCPcopy Create free account
hub / github.com/NationalSecurityAgency/TraceAnalysis / run

Method run

examples/tiny/TraceScript.java:508–533  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

506 }
507
508 @Override
509 protected void run() throws Exception {
510 SleighLanguage language = (SleighLanguage) getLanguage(currentProgram.getLanguageID());
511 AddressSpace dyn = language.getDefaultSpace();
512 try {
513 Tracer t = new Tracer("/tmp/ghidra.trace", currentProgram.getLanguageID().getIdAsString());
514
515
516 Address entryAddr = dyn.getAddress(0x00401000L);
517 t.createEmulator(language);
518 BytesPcodeThread thread = t.createThread("trace", entryAddr, currentProgram);
519 try {
520 while(true) {
521 thread.stepInstruction();
522 }
523 }
524 catch (InterruptPcodeExecutionException e) {
525 println("Exception: " + e);
526 return;
527 }
528 }
529 catch (Exception e) {
530 println("Exception: " + e);
531 return;
532 }
533 }
534}

Callers 1

driverFunction · 0.45

Calls 3

createEmulatorMethod · 0.95
createThreadMethod · 0.95
getAddressMethod · 0.45

Tested by

no test coverage detected