diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-08-07 21:10:57 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-08-08 16:12:00 +0200 |
| commit | e6f2b1431e0364583385a44d03a78775d9578dd9 (patch) | |
| tree | 3d90eb0691e82eac184cf0160add783f0a8a68c3 /example/ida | |
| parent | bb1a8f8289cd7132f5013fbe198d59d98fc6f158 (diff) | |
| download | miasm-e6f2b1431e0364583385a44d03a78775d9578dd9.tar.gz miasm-e6f2b1431e0364583385a44d03a78775d9578dd9.zip | |
Symbexec: add get_block
Diffstat (limited to 'example/ida')
| -rw-r--r-- | example/ida/ctype_propagation.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index bedaa525..7eb209cd 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -53,18 +53,6 @@ Dependency Graph Settings form.rUnaliasStack.checked = True -def get_block(ir_arch, mdis, addr): - """Get IRBlock at address @addr""" - lbl = ir_arch.get_label(addr) - if not lbl in ir_arch.blocks: - block = mdis.dis_block(lbl.offset) - ir_arch.add_block(block) - irblock = ir_arch.get_block(lbl) - if irblock is None: - raise LookupError('No block found at that address: %s' % lbl) - return irblock - - def get_types_mngr(headerFile, arch): text = open(headerFile).read() if arch == "AMD64_unk": @@ -265,8 +253,7 @@ def analyse_function(): done.add((lbl, state)) symbexec_engine = TypePropagationEngine(ir_arch, types_mngr, state) - get_block(ir_arch, mdis, lbl) - + assert lbl in ir_arch.blocks addr = symbexec_engine.emul_ir_block(lbl) symbexec_engine.del_mem_above_stack(ir_arch.sp) |