about summary refs log tree commit diff stats
path: root/miasm2/analysis/dse.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-10-12 13:49:37 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-10-12 13:49:37 +0200
commit9503c250c5524a6c388aba032be4e34517b358f9 (patch)
treecb9ddd00da3917c31b570b5b9ca849ac4803c55c /miasm2/analysis/dse.py
parent3cd3675165cd96c030401fbb1e6392898507a71b (diff)
downloadmiasm-9503c250c5524a6c388aba032be4e34517b358f9.tar.gz
miasm-9503c250c5524a6c388aba032be4e34517b358f9.zip
Expression: replace arg by ptr in ExprMem
Diffstat (limited to 'miasm2/analysis/dse.py')
-rw-r--r--miasm2/analysis/dse.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/miasm2/analysis/dse.py b/miasm2/analysis/dse.py
index 1a3c0259..1875f138 100644
--- a/miasm2/analysis/dse.py
+++ b/miasm2/analysis/dse.py
@@ -105,9 +105,9 @@ class ESETrackModif(EmulatedSymbExec):
                                        # symbolize
 
     def _func_read(self, expr_mem):
-        if not expr_mem.arg.is_int():
+        if not expr_mem.ptr.is_int():
             return expr_mem
-        dst_addr = int(expr_mem.arg)
+        dst_addr = int(expr_mem.ptr)
 
         if not self.dse_memory_range:
             # Trivial case (optimization)
@@ -121,7 +121,7 @@ class ESETrackModif(EmulatedSymbExec):
                 out.append(self.dse_memory_to_expr(addr))
             else:
                 # Get concrete value
-                atomic_access = ExprMem(ExprInt(addr, expr_mem.arg.size), 8)
+                atomic_access = ExprMem(ExprInt(addr, expr_mem.ptr.size), 8)
                 out.append(super(ESETrackModif, self)._func_read(atomic_access))
 
         if len(out) == 1:
@@ -284,8 +284,8 @@ class DSEEngine(object):
                     value = getattr(self.jitter.cpu, symbol.name)
                     if value != symb_value:
                         errors.append(DriftInfo(symbol, symb_value, value))
-            elif symbol.is_mem() and symbol.arg.is_int():
-                value_chr = self.jitter.vm.get_mem(int(symbol.arg),
+            elif symbol.is_mem() and symbol.ptr.is_int():
+                value_chr = self.jitter.vm.get_mem(int(symbol.ptr),
                                                    symbol.size / 8)
                 exp_value = int(value_chr[::-1].encode("hex"), 16)
                 if exp_value != symb_value:
@@ -638,7 +638,7 @@ class DSEPathConstraint(DSEEngine):
                     mem.update(eaff.src.get_r(mem_read=True))
                     for expr in mem:
                         if expr.is_mem():
-                            addr_range = expr_range(expr.arg)
+                            addr_range = expr_range(expr.ptr)
                             # At upper bounds, add the size of the memory access
                             # if addr (- [a, b], then @size[addr] reachables
                             # values are in @8[a, b + size[