about summary refs log tree commit diff stats
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/expression/basic_simplification.py4
-rw-r--r--example/expression/expr_grapher.py8
-rw-r--r--example/expression/expr_reduce.py2
-rw-r--r--example/expression/simplification_add.py2
-rw-r--r--example/expression/simplification_tools.py10
-rw-r--r--example/expression/solve_condition_stp.py2
-rw-r--r--example/symbol_exec/depgraph.py4
7 files changed, 16 insertions, 16 deletions
diff --git a/example/expression/basic_simplification.py b/example/expression/basic_simplification.py
index ef904686..eefdc765 100644
--- a/example/expression/basic_simplification.py
+++ b/example/expression/basic_simplification.py
@@ -6,8 +6,8 @@ Simple expression simplification demo
 """
 
 
-a = ExprId('eax')
-b = ExprId('ebx')
+a = ExprId('eax', 32)
+b = ExprId('ebx', 32)
 
 exprs = [a + b - a,
          ExprInt(0x12, 32) + ExprInt(0x30, 32) - a,
diff --git a/example/expression/expr_grapher.py b/example/expression/expr_grapher.py
index 0de2142b..9bf6cd84 100644
--- a/example/expression/expr_grapher.py
+++ b/example/expression/expr_grapher.py
@@ -2,10 +2,10 @@ from miasm2.expression.expression import *
 
 print "Simple Expression grapher demo"
 
-a = ExprId("A")
-b = ExprId("B")
-c = ExprId("C")
-d = ExprId("D")
+a = ExprId("A", 32)
+b = ExprId("B", 32)
+c = ExprId("C", 32)
+d = ExprId("D", 32)
 m = ExprMem(a + b + c + a)
 
 e1 = ExprCompose(a + b - (c * a) / m | b, a + m)
diff --git a/example/expression/expr_reduce.py b/example/expression/expr_reduce.py
index bb94ceb9..7c6e0c4c 100644
--- a/example/expression/expr_reduce.py
+++ b/example/expression/expr_reduce.py
@@ -75,7 +75,7 @@ class StructLookup(ExprReducer):
 def test():
     struct_lookup = StructLookup()
 
-    ptr = ExprId('ECX')
+    ptr = ExprId('ECX', 32)
     int4 = ExprInt(4, 32)
     tests = [
         (ptr, StructLookup.FIELD_A_PTR),
diff --git a/example/expression/simplification_add.py b/example/expression/simplification_add.py
index 41720f3a..621d1139 100644
--- a/example/expression/simplification_add.py
+++ b/example/expression/simplification_add.py
@@ -30,7 +30,7 @@ def simp_add_mul(expr_simp, expr):
         # Do not simplify
         return expr
 
-a = m2_expr.ExprId('a')
+a = m2_expr.ExprId('a', 32)
 base_expr = a + a + a
 print "Without adding the simplification:"
 print "\t%s = %s" % (base_expr, expr_simp(base_expr))
diff --git a/example/expression/simplification_tools.py b/example/expression/simplification_tools.py
index 258b5ce4..1fb95a80 100644
--- a/example/expression/simplification_tools.py
+++ b/example/expression/simplification_tools.py
@@ -7,11 +7,11 @@ Expression simplification demo.
 """
 
 
-a = ExprId('a')
-b = ExprId('b')
-c = ExprId('c')
-d = ExprId('d')
-e = ExprId('e')
+a = ExprId('a', 32)
+b = ExprId('b', 32)
+c = ExprId('c', 32)
+d = ExprId('d', 32)
+e = ExprId('e', 32)
 
 m = ExprMem(a)
 s = a[:8]
diff --git a/example/expression/solve_condition_stp.py b/example/expression/solve_condition_stp.py
index b3ee6938..24d2dd50 100644
--- a/example/expression/solve_condition_stp.py
+++ b/example/expression/solve_condition_stp.py
@@ -109,7 +109,7 @@ if __name__ == '__main__':
 
     argc = ExprId('argc', 32)
     argv = ExprId('argv', 32)
-    ret_addr = ExprId('ret_addr')
+    ret_addr = ExprId('ret_addr', 32)
     reg_and_id[argc.name] = argc
     reg_and_id[argv.name] = argv
     reg_and_id[ret_addr.name] = ret_addr
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py
index e24f7f9b..b8d838ae 100644
--- a/example/symbol_exec/depgraph.py
+++ b/example/symbol_exec/depgraph.py
@@ -55,8 +55,8 @@ if args.rename_args:
     if arch == "x86_32":
         # StdCall example
         for i in xrange(4):
-            e_mem = ExprMem(ExprId("ESP_init") + ExprInt(4 * (i + 1), 32), 32)
-            init_ctx[e_mem] = ExprId("arg%d" % i)
+            e_mem = ExprMem(ExprId("ESP_init", 32) + ExprInt(4 * (i + 1), 32), 32)
+            init_ctx[e_mem] = ExprId("arg%d" % i, 32)
 
 # Disassemble the targeted function
 blocks = mdis.dis_multiblock(int(args.func_addr, 0))