From e33bffdca01c7528608681e6d79afcb1b46e37de Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Thu, 27 Jul 2017 17:22:19 +0200 Subject: Asmblock: remove disasm engine job_done attribute WARNING: disasmEngine behaviour modification Before patch: job_done containted the already disassembled addresses. If the user disassembled twice the same addresse, the engine will return empty object on the second call. After patch: If the user disassemble twice the same addresse, the engine will return result of the disassembling in both cases. --- test/core/asmblock.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/core/asmblock.py') diff --git a/test/core/asmblock.py b/test/core/asmblock.py index c3b220df..eb7b54b2 100644 --- a/test/core/asmblock.py +++ b/test/core/asmblock.py @@ -19,12 +19,16 @@ first_block = mdis.dis_block(0) assert len(first_block.lines) == 5 print first_block +## Test redisassemble blocks +first_block_bis = mdis.dis_block(0) +assert len(first_block.lines) == len(first_block_bis.lines) +print first_block_bis + ## Disassembly of several block, with cache blocks = mdis.dis_multiblock(0) -assert len(blocks) == 0 +assert len(blocks) == 17 -## Test cache -mdis.job_done.clear() +## Test redisassemble blocks blocks = mdis.dis_multiblock(0) assert len(blocks) == 17 ## Equality between assembly lines is not yet implemented -- cgit 1.4.1