diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-07-27 17:22:19 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-07-27 21:17:54 +0200 |
| commit | e33bffdca01c7528608681e6d79afcb1b46e37de (patch) | |
| tree | a829bb6ea4040bde14b212fa8581fac92bbdea3b /test/core/asmblock.py | |
| parent | b088e965b09abedad4e62664c05b06a65522a80e (diff) | |
| download | miasm-e33bffdca01c7528608681e6d79afcb1b46e37de.tar.gz miasm-e33bffdca01c7528608681e6d79afcb1b46e37de.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | test/core/asmblock.py | 10 |
1 files changed, 7 insertions, 3 deletions
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 |