about summary refs log tree commit diff stats
path: root/example/ida/symbol_exec.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-18 09:27:45 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-19 16:42:46 +0200
commitf1b32ba2b8db22a5f92a2734af55e9a5dba2271e (patch)
tree92facadca71fc07d7760c60d2ca877774c73579b /example/ida/symbol_exec.py
parent8f5ca332780cf9e08761060e9903bc085dbc8430 (diff)
downloadmiasm-f1b32ba2b8db22a5f92a2734af55e9a5dba2271e.tar.gz
miasm-f1b32ba2b8db22a5f92a2734af55e9a5dba2271e.zip
Example/ida: use addr to guess arch
Some arch like ARM depends on address in order to determine which
attributes have to be used during analysis
Diffstat (limited to 'example/ida/symbol_exec.py')
-rw-r--r--example/ida/symbol_exec.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/ida/symbol_exec.py b/example/ida/symbol_exec.py
index 49c6fdb6..0d8c63c2 100644
--- a/example/ida/symbol_exec.py
+++ b/example/ida/symbol_exec.py
@@ -128,11 +128,12 @@ def symbolic_exec():
 
     from utils import guess_machine
 
+    start, end = idc.SelStart(), idc.SelEnd()
+
     bs = bin_stream_ida()
-    machine = guess_machine()
+    machine = guess_machine(addr=start)
 
     mdis = machine.dis_engine(bs)
-    start, end = idc.SelStart(), idc.SelEnd()
 
     if start == idc.BADADDR and end == idc.BADADDR:
         start = idc.ScreenEA()