diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2022-02-28 17:52:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-28 17:52:53 +0100 |
| commit | b9ecc43cf5ae1583cb9a1e053bac5be2e6c68aa0 (patch) | |
| tree | 45d594309fc3a4390a5b1ad75ab7fd40fa18385f /test | |
| parent | fb02fe52a4ee8473d40b460022c9c39c93027e57 (diff) | |
| parent | 35bb4bc0a147672c970962c187515ab67adf2212 (diff) | |
| download | miasm-b9ecc43cf5ae1583cb9a1e053bac5be2e6c68aa0.tar.gz miasm-b9ecc43cf5ae1583cb9a1e053bac5be2e6c68aa0.zip | |
Merge pull request #1417 from WilliamBruneau/mem_bp
Add memory breakpoints in debugger and examples
Diffstat (limited to '')
| -rw-r--r-- | test/jitter/mem_breakpoint.py | 4 | ||||
| -rw-r--r-- | test/jitter/test_post_instr.py | 4 | ||||
| -rwxr-xr-x | test/test_all.py | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/test/jitter/mem_breakpoint.py b/test/jitter/mem_breakpoint.py index bd51e692..9ec9a06d 100644 --- a/test/jitter/mem_breakpoint.py +++ b/test/jitter/mem_breakpoint.py @@ -71,9 +71,7 @@ jitter.vm.set_mem(0xFFFFFF800901EBEC, decode_hex("FD7BBEA901008052FD030091A26300 jitter.set_trace_log() -jitter.exceptions_handler.callbacks[EXCEPT_BREAKPOINT_MEMORY] = [] -jitter.add_exception_handler(EXCEPT_BREAKPOINT_MEMORY, - mem_breakpoint_handler) +jitter.add_exception_handler(EXCEPT_BREAKPOINT_MEMORY, mem_breakpoint_handler) jitter.vm.add_memory_breakpoint(0xFFFFFF8009080000, 0x8000000, PAGE_READ | PAGE_WRITE) jitter.init_run(0xFFFFFF800901EBEC) diff --git a/test/jitter/test_post_instr.py b/test/jitter/test_post_instr.py index 5a690e6b..896ce597 100644 --- a/test/jitter/test_post_instr.py +++ b/test/jitter/test_post_instr.py @@ -36,9 +36,7 @@ jitter.set_trace_log() def do_not_raise_me(jitter): raise ValueError("Should not be here") -jitter.exceptions_handler.callbacks[EXCEPT_BREAKPOINT_MEMORY] = [] -jitter.add_exception_handler(EXCEPT_BREAKPOINT_MEMORY, - do_not_raise_me) +jitter.add_exception_handler(EXCEPT_BREAKPOINT_MEMORY, do_not_raise_me) jitter.vm.add_memory_breakpoint(0x11000-4, 4, PAGE_READ | PAGE_WRITE) # The memory write pending will raise automod exception diff --git a/test/test_all.py b/test/test_all.py index a49f6ff9..1ec49324 100755 --- a/test/test_all.py +++ b/test/test_all.py @@ -796,6 +796,11 @@ for jitter in ExampleJitter.jitter_engines: products=[Example.get_sample("box_upx_exe_unupx.bin")], tags=tags.get(jitter, [])) + testset += ExampleJitter(["memory_breakpoint.py", + Example.get_sample("box_upx.exe")] + + ["--jitter", jitter] + + ["-o", "0x401130", "0x100", "--access", "rw"], + tags=tags.get(jitter, [])) for script, dep in [(["x86_32.py", Example.get_sample("x86_32_sc.bin")], []), (["arm.py", Example.get_sample("md5_arm"), "--mimic-env"], |