about summary refs log tree commit diff stats
path: root/example/expression/access_c.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2017-07-30 16:42:01 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2017-08-07 16:42:30 +0200
commit8df4d3770c91e63041bf9f32def7b3737d8be304 (patch)
tree72efee5ca331178afa93d761fdb116f70e834e6b /example/expression/access_c.py
parent26e36e96a7fa2c0b8178be53cf923111ca04f7d4 (diff)
downloadmiasm-8df4d3770c91e63041bf9f32def7b3737d8be304.tar.gz
miasm-8df4d3770c91e63041bf9f32def7b3737d8be304.zip
Examples: update api
Diffstat (limited to 'example/expression/access_c.py')
-rw-r--r--example/expression/access_c.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/expression/access_c.py b/example/expression/access_c.py
index 7255e23a..48da53ff 100644
--- a/example/expression/access_c.py
+++ b/example/expression/access_c.py
@@ -2,7 +2,7 @@ import sys
 
 from miasm2.analysis.machine import Machine
 from miasm2.analysis.binary import Container
-from miasm2.expression.expression import ExprOp, ExprCompose, ExprId
+from miasm2.expression.expression import ExprOp, ExprCompose, ExprId, ExprInt
 from miasm2.analysis.depgraph import DependencyGraph
 
 from miasm2.arch.x86.ctype import CTypeAMD64_unk
@@ -170,7 +170,8 @@ open('graph_irflow.dot', 'w').write(ir_arch_a.graph.dot())
 ptr_llhuman = types_mngr.get_objc(CTypePtr(CTypeStruct('ll_human')))
 arg0 = ExprId('ptr', 64)
 ctx = {ir_arch_a.arch.regs.RDI: arg0}
-expr_types = {arg0.name: ptr_llhuman}
+expr_types = {arg0: (ptr_llhuman,),
+              ExprInt(0x8A, 64): (ptr_llhuman,)}
 
 mychandler = MyCHandler(types_mngr, expr_types)