about summary refs log tree commit diff stats
path: root/example/ida
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-07-05 22:29:18 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-07-05 22:29:18 +0200
commit814b0dff0d6a257f0d8fb55239e1bea5a7c6b94f (patch)
tree8bb10c3d1f7c7756a01801ae01785c876f7e878a /example/ida
parent34aac8a90f77d461d9dee0b9cf0af3c2bff4d42f (diff)
downloadmiasm-814b0dff0d6a257f0d8fb55239e1bea5a7c6b94f.tar.gz
miasm-814b0dff0d6a257f0d8fb55239e1bea5a7c6b94f.zip
Example/ida: fix dg
Diffstat (limited to 'example/ida')
-rw-r--r--example/ida/depgraph.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/example/ida/depgraph.py b/example/ida/depgraph.py
index 297877a1..13c37eee 100644
--- a/example/ida/depgraph.py
+++ b/example/ida/depgraph.py
@@ -159,7 +159,7 @@ def clean_lines():
 
 def treat_element():
     "Display an element"
-    global graphs, comments, sol_nb, settings, addr, ir_arch
+    global graphs, comments, sol_nb, settings, addr, ir_arch, ircfg
 
     try:
         graph = graphs.next()
@@ -176,7 +176,7 @@ def treat_element():
 
     for node in graph.relevant_nodes:
         try:
-            offset = ir_arch.blocks[node.loc_key][node.line_nb].instr.offset
+            offset = ircfg.blocks[node.loc_key][node.line_nb].instr.offset
         except IndexError:
             print "Unable to highlight %s" % node
             continue
@@ -186,7 +186,7 @@ def treat_element():
     if graph.has_loop:
         print 'Graph has dependency loop: symbolic execution is inexact'
     else:
-        print "Possible value: %s" % graph.emul(self.ira).values()[0]
+        print "Possible value: %s" % graph.emul(ir_arch).values()[0]
 
     for offset, elements in comments.iteritems():
         idc.MakeComm(offset, ", ".join(map(str, elements)))
@@ -198,7 +198,7 @@ def next_element():
 
 
 def launch_depgraph():
-    global graphs, comments, sol_nb, settings, addr, ir_arch
+    global graphs, comments, sol_nb, settings, addr, ir_arch, ircfg
     # Get the current function
     addr = idc.ScreenEA()
     func = ida_funcs.get_func(addr)
@@ -228,7 +228,7 @@ def launch_depgraph():
 
     loc_key, elements, line_nb = settings.loc_key, settings.elements, settings.line_nb
     # Simplify affectations
-    for irb in ir_arch.blocks.values():
+    for irb in ircfg.blocks.values():
         irs = []
         offset = ir_arch.loc_db.get_location_offset(irb.loc_key)
         fix_stack = offset is not None and settings.unalias_stack
@@ -246,7 +246,7 @@ def launch_depgraph():
                 dst, src = expr_simp(dst), expr_simp(src)
                 new_assignblk[dst] = src
             irs.append(AssignBlock(new_assignblk, instr=assignblk.instr))
-        ir_arch.blocks[irb.loc_key] = IRBlock(irb.loc_key, irs)
+        ircfg.blocks[irb.loc_key] = IRBlock(irb.loc_key, irs)
 
     # Get dependency graphs
     dg = settings.depgraph