diff options
| author | serpilliere <devnull@localhost> | 2014-08-26 10:55:08 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-08-26 10:55:08 +0200 |
| commit | efd4a92548f3b0c176c96de687191b0e5d93fa0e (patch) | |
| tree | 1078a82061d7e2d366cb36b85f7c6427c12fb2bf /example | |
| parent | eef0117c28daeb06bd4723dae7b77987d4326378 (diff) | |
| download | miasm-efd4a92548f3b0c176c96de687191b0e5d93fa0e.tar.gz miasm-efd4a92548f3b0c176c96de687191b0e5d93fa0e.zip | |
jittcc: free tcc_states on jit del
Diffstat (limited to 'example')
| -rw-r--r-- | example/test_jit_mips32.py | 7 | ||||
| -rw-r--r-- | example/test_jit_x86_32.py | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/example/test_jit_mips32.py b/example/test_jit_mips32.py index 00e7e9a7..2e18b9dd 100644 --- a/example/test_jit_mips32.py +++ b/example/test_jit_mips32.py @@ -33,6 +33,11 @@ parser.add_argument("addr", machine = Machine("mips32l") +def code_sentinelle(jitter): + jitter.run = False + jitter.pc = 0 + return True + def jit_mips32_binary(args): filepath, entryp = args.binary, int(args.addr, 16) myjit = machine.jitter(jit_type = args.jitter) @@ -44,7 +49,7 @@ def jit_mips32_binary(args): myjit.jit.log_newbloc = args.log_newbloc myjit.vm.vm_add_memory_page(0, PAGE_READ | PAGE_WRITE, open(filepath).read()) - myjit.add_breakpoint(0x1337BEEF, lambda _: exit(0)) + myjit.add_breakpoint(0x1337BEEF, code_sentinelle) # for stack diff --git a/example/test_jit_x86_32.py b/example/test_jit_x86_32.py index 977b90fe..44696c74 100644 --- a/example/test_jit_x86_32.py +++ b/example/test_jit_x86_32.py @@ -40,3 +40,4 @@ myjit.add_breakpoint(0x1337beef, code_sentinelle) myjit.init_run(run_addr) myjit.continue_run() +del(myjit) |