about summary refs log tree commit diff stats
path: root/miasm/tools
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2012-06-12 13:08:34 +0200
committerserpilliere <devnull@localhost>2012-06-12 13:08:34 +0200
commitf29e0cfd42e6207929205e26dc6afebb686ca339 (patch)
tree67af001655f4ef7105e95582001f6d22b95a47fa /miasm/tools
parent7349000a9649cbce710a3e5df7a779e56c0e7ae4 (diff)
downloadfocaccia-miasm-f29e0cfd42e6207929205e26dc6afebb686ca339.tar.gz
focaccia-miasm-f29e0cfd42e6207929205e26dc6afebb686ca339.zip
expression: replace reload_expr with replace_expr using visitor
Diffstat (limited to 'miasm/tools')
-rw-r--r--miasm/tools/to_c_helper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm/tools/to_c_helper.py b/miasm/tools/to_c_helper.py
index 508c57d7..50d79d0b 100644
--- a/miasm/tools/to_c_helper.py
+++ b/miasm/tools/to_c_helper.py
@@ -228,7 +228,7 @@ for x in my_C_id:
     id2Cid[x] = ExprId('vmcpu.'+str(x), x.get_size())
 
 def patch_c_id(e):
-    return e.reload_expr(id2Cid)
+    return e.replace_expr(id2Cid)
 
 
 code_deal_exception_at_instr = r"""
@@ -331,7 +331,7 @@ def Exp2C(exprs, l = None, addr2label = None, gen_exception_code = False):
         if True:#e.dst != eip:
             src, dst = e.src, e.dst
             # reload src using prefetch
-            src = src.reload_expr(src_w_len)
+            src = src.replace_expr(src_w_len)
             str_src = patch_c_id(src).toC()
             str_dst = patch_c_id(dst).toC()
             if isinstance(dst, ExprId):
@@ -935,7 +935,7 @@ if __name__ == '__main__':
         print x
     print '#'*80
 
-    new_e = [x.reload_expr({ExprMem(eax): ExprId('ioio')}) for x in e]
+    new_e = [x.replace_expr({ExprMem(eax): ExprId('ioio')}) for x in e]
     for x in new_e:
         print x
     print '-'*80