diff options
| author | William Bruneau <william.bruneau@epfedu.fr> | 2022-02-22 14:54:54 +0100 |
|---|---|---|
| committer | William Bruneau <william.bruneau@epfedu.fr> | 2022-02-23 08:44:51 +0100 |
| commit | 321d298a5265e94fde00c3c8068dc87612ac1e5a (patch) | |
| tree | 8ba3b4493e038f12ecae6e4dade2f2feab37f807 /test | |
| parent | 53f1cbece50351d59ad22b09b4606138f980f0ba (diff) | |
| download | focaccia-miasm-321d298a5265e94fde00c3c8068dc87612ac1e5a.tar.gz focaccia-miasm-321d298a5265e94fde00c3c8068dc87612ac1e5a.zip | |
Add memory breakpoints in debugger and examples
Diffstat (limited to 'test')
| -rw-r--r-- | test/jitter/mem_breakpoint.py | 4 | ||||
| -rw-r--r-- | test/jitter/test_post_instr.py | 4 |
2 files changed, 2 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 |