diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-12-25 21:37:02 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-12-25 21:37:02 +0100 |
| commit | 972cad3a89d2856a6969328a9870a1b472cd9fd2 (patch) | |
| tree | 65687e39ab4ce446957c73d95fd5d662b49d68ed /example/expression/access_c.py | |
| parent | dd14b59efbd918838dcbb88c8d64bad53fcd054c (diff) | |
| download | miasm-972cad3a89d2856a6969328a9870a1b472cd9fd2.tar.gz miasm-972cad3a89d2856a6969328a9870a1b472cd9fd2.zip | |
Rename examples lifter
Diffstat (limited to 'example/expression/access_c.py')
| -rw-r--r-- | example/expression/access_c.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/expression/access_c.py b/example/expression/access_c.py index fd50a917..e2f1c6f5 100644 --- a/example/expression/access_c.py +++ b/example/expression/access_c.py @@ -151,21 +151,21 @@ addr_head = 0 asmcfg = mdis.dis_multiblock(addr_head) lbl_head = loc_db.get_offset_location(addr_head) -ir_arch_a = lifter_model_call(loc_db) -ircfg = ir_arch_a.new_ircfg_from_asmcfg(asmcfg) +lifter = lifter_model_call(loc_db) +ircfg = lifter.new_ircfg_from_asmcfg(asmcfg) open('graph_irflow.dot', 'w').write(ircfg.dot()) # Main function's first argument's type is "struct ll_human*" ptr_llhuman = types_mngr.get_objc(CTypePtr(CTypeStruct('ll_human'))) arg0 = ExprId('ptr', 64) -ctx = {ir_arch_a.arch.regs.RDI: arg0} +ctx = {lifter.arch.regs.RDI: arg0} expr_types = {arg0: (ptr_llhuman,), ExprInt(0x8A, 64): (ptr_llhuman,)} mychandler = MyCHandler(types_mngr, expr_types) -for expr in get_funcs_arg0(ctx, ir_arch_a, ircfg, lbl_head): +for expr in get_funcs_arg0(ctx, lifter, ircfg, lbl_head): print("Access:", expr) for c_str, ctype in mychandler.expr_to_c_and_types(expr): print('\taccess:', c_str) |