diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-06-22 19:49:09 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-05 16:14:26 +0200 |
| commit | 195c688da01add6d4d964addfe7e34bea78bdb03 (patch) | |
| tree | 80b346193da5609d19cdfc389ea84ad66399fa67 /test/ir/symbexec.py | |
| parent | 3e86fb7046eef0adef023207cb4875174b26beea (diff) | |
| download | miasm-195c688da01add6d4d964addfe7e34bea78bdb03.tar.gz miasm-195c688da01add6d4d964addfe7e34bea78bdb03.zip | |
IR: gen ircfg from ir_arch
Diffstat (limited to '')
| -rwxr-xr-x | test/ir/symbexec.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/ir/symbexec.py b/test/ir/symbexec.py index d57bcba0..3158be60 100755 --- a/test/ir/symbexec.py +++ b/test/ir/symbexec.py @@ -10,10 +10,15 @@ class TestSymbExec(unittest.TestCase): from miasm2.expression.expression import ExprInt, ExprId, ExprMem, \ ExprCompose, ExprAff from miasm2.arch.x86.sem import ir_x86_32 + from miasm2.core.locationdb import LocationDB from miasm2.ir.symbexec import SymbolicExecutionEngine from miasm2.ir.ir import AssignBlock + loc_db = LocationDB() + ira = ir_x86_32(loc_db) + ircfg = ira.new_ircfg() + id_x = ExprId('x', 32) id_a = ExprId('a', 32) id_b = ExprId('b', 32) @@ -21,7 +26,7 @@ class TestSymbExec(unittest.TestCase): id_d = ExprId('d', 32) id_e = ExprId('e', 64) - sb = SymbolicExecutionEngine(ir_x86_32(), + sb = SymbolicExecutionEngine(ira, { ExprMem(ExprInt(0x4, 32), 8): ExprInt(0x44, 8), ExprMem(ExprInt(0x5, 32), 8): ExprInt(0x33, 8), @@ -222,13 +227,14 @@ class TestSymbExec(unittest.TestCase): assert found - sb_empty = SymbolicExecutionEngine(ir_x86_32()) + sb_empty = SymbolicExecutionEngine(ira) sb_empty.dump() # Test memory full print 'full' - arch_addr8 = ir_x86_32() + arch_addr8 = ir_x86_32(loc_db) + ircfg = arch_addr8.new_ircfg() # Hack to obtain tiny address space arch_addr8.addrsize = 5 sb_addr8 = SymbolicExecutionEngine(arch_addr8) |