diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-12-26 00:03:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-26 00:03:54 +0100 |
| commit | 1673c3eb29d88cbd7b642419c197fa0993ca5871 (patch) | |
| tree | b5489af2d481c9db7f3c530d3b1634031cfbd4d5 /example/expression/access_c.py | |
| parent | 931a7d95bf48ec35b9c69b4e22b890f512164a9b (diff) | |
| parent | 1d95a7febaee8c53df432cdbf1539f6f58a4d5d9 (diff) | |
| download | focaccia-miasm-1673c3eb29d88cbd7b642419c197fa0993ca5871.tar.gz focaccia-miasm-1673c3eb29d88cbd7b642419c197fa0993ca5871.zip | |
Merge pull request #1335 from serpilliere/rename_ir_arch
Rename ir arch
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) |