diff options
Diffstat (limited to 'example/jitter/trace.py')
| -rw-r--r-- | example/jitter/trace.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/example/jitter/trace.py b/example/jitter/trace.py index e1683450..46b313c1 100644 --- a/example/jitter/trace.py +++ b/example/jitter/trace.py @@ -6,12 +6,14 @@ This example demonstrates two instrumentation possibility: Note: for better performance, one can also extend Codegen to produce instrumentation at the C / LLVM level """ +from __future__ import print_function + import os import time from pdb import pm -from miasm2.analysis.sandbox import Sandbox_Linux_arml -from miasm2.jitter.emulatedsymbexec import EmulatedSymbExec -from miasm2.jitter.jitcore_python import JitCore_Python +from miasm.analysis.sandbox import Sandbox_Linux_arml +from miasm.jitter.emulatedsymbexec import EmulatedSymbExec +from miasm.jitter.jitcore_python import JitCore_Python # Function called at each instruction instr_count = 0 @@ -26,11 +28,11 @@ class ESETrackMemory(EmulatedSymbExec): def mem_read(self, expr_mem): value = super(ESETrackMemory, self).mem_read(expr_mem) - print "Read %s: %s" % (expr_mem, value) + print("Read %s: %s" % (expr_mem, value)) return value def mem_write(self, dest, data): - print "Write %s: %s" % (dest, data) + print("Write %s: %s" % (dest, data)) return super(ESETrackMemory, self).mem_write(dest, data) # Parse arguments @@ -55,4 +57,4 @@ sb.run() stop_time = time.time() assert sb.jitter.run is False -print "Instr speed: %02.f / sec" % (instr_count / (stop_time - start_time)) +print("Instr speed: %02.f / sec" % (instr_count / (stop_time - start_time))) |