about summary refs log tree commit diff stats
path: root/example/expression/graph_dataflow.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2017-12-11 14:26:23 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-08 17:35:05 +0200
commita2637cdf0b40df074865d23a7fd71f082ad7f40a (patch)
treef6c958ca8481e6e29760078e5d1bdc2d2b64da53 /example/expression/graph_dataflow.py
parentdadfaabc3fff5edb9bf4ef7e7e8c4cfc4baccb94 (diff)
downloadfocaccia-miasm-a2637cdf0b40df074865d23a7fd71f082ad7f40a.tar.gz
focaccia-miasm-a2637cdf0b40df074865d23a7fd71f082ad7f40a.zip
Expr: Add new word ExprLoc
This word represents a location in the binary.
Thus, the hack of ExprId containing an AsmLabel ends here.
Diffstat (limited to 'example/expression/graph_dataflow.py')
-rw-r--r--example/expression/graph_dataflow.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/example/expression/graph_dataflow.py b/example/expression/graph_dataflow.py
index 26fdd2ec..dd7e37a1 100644
--- a/example/expression/graph_dataflow.py
+++ b/example/expression/graph_dataflow.py
@@ -24,7 +24,7 @@ def node_x_2_id(n, x):
 
 
 def get_node_name(label, i, n):
-    n_name = (label.name, i, n)
+    n_name = (label, i, n)
     return n_name
 
 
@@ -93,9 +93,11 @@ def gen_block_data_flow_graph(ir_arch, ad, block_flow_cb):
 
     dead_simp(ir_arch)
 
+
     irblock_0 = None
     for irblock in ir_arch.blocks.values():
-        if irblock.label.offset == ad:
+        label = ir_arch.symbol_pool.loc_key_to_label(irblock.label)
+        if label.offset == ad:
             irblock_0 = irblock
             break
     assert(irblock_0 is not None)
@@ -144,8 +146,6 @@ for block in blocks:
     ir_arch.add_block(block)
 for irblock in ir_arch.blocks.values():
     print irblock
-    if irblock.label.offset != 0:
-        continue
 
 
 if args.symb: