diff options
| author | Camille Mougey <commial@gmail.com> | 2018-06-21 14:21:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-21 14:21:15 +0200 |
| commit | e84d9554ec69a71e1300901eeac940424b9744a8 (patch) | |
| tree | e43438e959a5a38d45787753863abb34c5d82ba7 /test | |
| parent | bd80c0876aeecdc027c0c0b0725f0f890d41fa62 (diff) | |
| parent | c6462990df3773ed4bdf82f7dc3b30f1c6331a81 (diff) | |
| download | miasm-e84d9554ec69a71e1300901eeac940424b9744a8.tar.gz miasm-e84d9554ec69a71e1300901eeac940424b9744a8.zip | |
Merge pull request #772 from serpilliere/add_jit_trace_api
Jitter: add simple trace api
Diffstat (limited to 'test')
| -rw-r--r-- | test/analysis/dse.py | 3 | ||||
| -rw-r--r-- | test/arch/aarch64/unit/asm_test.py | 5 | ||||
| -rw-r--r-- | test/arch/mips32/unit/asm_test.py | 3 | ||||
| -rw-r--r-- | test/arch/x86/unit/asm_test.py | 7 | ||||
| -rw-r--r-- | test/jitter/bad_block.py | 3 | ||||
| -rw-r--r-- | test/jitter/jit_options.py | 3 | ||||
| -rw-r--r-- | test/jitter/jmp_out_mem.py | 3 | ||||
| -rw-r--r-- | test/jitter/test_post_instr.py | 4 |
8 files changed, 6 insertions, 25 deletions
diff --git a/test/analysis/dse.py b/test/analysis/dse.py index 5a72db34..4367f6f7 100644 --- a/test/analysis/dse.py +++ b/test/analysis/dse.py @@ -34,8 +34,7 @@ class DSETest(object): self.myjit = jitter(jitter_engine) self.myjit.init_stack() - self.myjit.jit.log_regs = True - self.myjit.jit.log_mn = True + self.myjit.set_trace_log() self.dse = None self.assembly = None diff --git a/test/arch/aarch64/unit/asm_test.py b/test/arch/aarch64/unit/asm_test.py index ca27ef9d..437a8056 100644 --- a/test/arch/aarch64/unit/asm_test.py +++ b/test/arch/aarch64/unit/asm_test.py @@ -16,16 +16,11 @@ class Asm_Test(object): self.myjit = Machine("aarch64l").jitter(jitter) self.myjit.init_stack() - self.myjit.jit.log_regs = False - self.myjit.jit.log_mn = False - - def __call__(self): self.asm() self.run() self.check() - def asm(self): blocks, symbol_pool = parse_asm.parse_txt(mn_aarch64, 'l', self.TXT, symbol_pool = self.myjit.ir_arch.symbol_pool) diff --git a/test/arch/mips32/unit/asm_test.py b/test/arch/mips32/unit/asm_test.py index f03a32d7..a2203783 100644 --- a/test/arch/mips32/unit/asm_test.py +++ b/test/arch/mips32/unit/asm_test.py @@ -18,9 +18,6 @@ class Asm_Test(object): self.myjit = Machine("mips32l").jitter(jitter) self.myjit.init_stack() - self.myjit.jit.log_regs = False - self.myjit.jit.log_mn = False - def __call__(self): self.asm() self.run() diff --git a/test/arch/x86/unit/asm_test.py b/test/arch/x86/unit/asm_test.py index 961967f9..4b802606 100644 --- a/test/arch/x86/unit/asm_test.py +++ b/test/arch/x86/unit/asm_test.py @@ -18,9 +18,6 @@ class Asm_Test(object): self.myjit = Machine(self.arch_name).jitter(jitter_engine) self.myjit.init_stack() - self.myjit.jit.log_regs = False - self.myjit.jit.log_mn = False - def test_init(self): pass @@ -81,10 +78,6 @@ class Asm_Test_16(Asm_Test): self.myjit.stack_size = 0x1000 self.myjit.init_stack() - self.myjit.jit.log_regs = False - self.myjit.jit.log_mn = False - - def init_machine(self): self.myjit.vm.add_memory_page(self.run_addr, PAGE_READ | PAGE_WRITE, self.assembly) self.myjit.push_uint16_t(self.ret_addr) diff --git a/test/jitter/bad_block.py b/test/jitter/bad_block.py index 04c1f475..ae11e696 100644 --- a/test/jitter/bad_block.py +++ b/test/jitter/bad_block.py @@ -32,8 +32,7 @@ run_addr = 0x40000000 jitter.vm.add_memory_page(run_addr, PAGE_READ | PAGE_WRITE, data) -jitter.jit.log_regs = True -jitter.jit.log_mn = True +jitter.set_trace_log() jitter.push_uint32_t(0x1337beef) jitter.add_breakpoint(0x1337beef, code_sentinelle) diff --git a/test/jitter/jit_options.py b/test/jitter/jit_options.py index 4fe936d5..a0ddbc11 100644 --- a/test/jitter/jit_options.py +++ b/test/jitter/jit_options.py @@ -33,8 +33,7 @@ def init_jitter(): # Init jitter myjit.init_stack() - myjit.jit.log_regs = True - myjit.jit.log_mn = True + myjit.set_trace_log() myjit.push_uint32_t(0x1337beef) myjit.add_breakpoint(0x1337beef, code_sentinelle) diff --git a/test/jitter/jmp_out_mem.py b/test/jitter/jmp_out_mem.py index 49da16ad..93ae8304 100644 --- a/test/jitter/jmp_out_mem.py +++ b/test/jitter/jmp_out_mem.py @@ -35,8 +35,7 @@ run_addr = 0x40000000 jitter.vm.add_memory_page(run_addr, PAGE_READ | PAGE_WRITE, data) -jitter.jit.log_regs = True -jitter.jit.log_mn = True +jitter.set_trace_log() jitter.push_uint32_t(0x1337beef) jitter.add_breakpoint(0x1337beef, code_sentinelle) diff --git a/test/jitter/test_post_instr.py b/test/jitter/test_post_instr.py index edf86645..39e87616 100644 --- a/test/jitter/test_post_instr.py +++ b/test/jitter/test_post_instr.py @@ -23,8 +23,8 @@ jitter.vm.add_memory_page(0x1000, PAGE_READ|PAGE_WRITE, "\x00"*0x1000, "code pag # RET jitter.vm.set_mem(0x1000, "B844332211C3".decode('hex')) -jitter.jit.log_mn = True -jitter.jit.log_regs = True + +jitter.set_trace_log() def do_not_raise_me(jitter): raise ValueError("Should not be here") |