diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-12-24 20:29:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-24 20:29:39 +0100 |
| commit | 53735e8cd23aa4bc1eed641264de3b9d18692103 (patch) | |
| tree | d00eca211174dcef32971e271f307721a1217a40 /example/expression/access_c.py | |
| parent | 40d150d0089494d07dd5e10bc7625df41fbf3f68 (diff) | |
| parent | 73e54732e50b405762c64e0faa032e5ae0fcd1ed (diff) | |
| download | miasm-53735e8cd23aa4bc1eed641264de3b9d18692103.tar.gz miasm-53735e8cd23aa4bc1eed641264de3b9d18692103.zip | |
Merge pull request #1326 from serpilliere/rename_lifter
Rename lifter
Diffstat (limited to 'example/expression/access_c.py')
| -rw-r--r-- | example/expression/access_c.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/expression/access_c.py b/example/expression/access_c.py index 3cc8e6a2..fd50a917 100644 --- a/example/expression/access_c.py +++ b/example/expression/access_c.py @@ -95,10 +95,10 @@ class MyExprToAccessC(ExprToAccessC): reduction_rules = ExprToAccessC.reduction_rules + [reduce_compose] -def get_funcs_arg0(ctx, ira, ircfg, lbl_head): +def get_funcs_arg0(ctx, lifter_model_call, ircfg, lbl_head): """Compute DependencyGraph on the func @lbl_head""" g_dep = DependencyGraph(ircfg, follow_call=False) - element = ira.arch.regs.RSI + element = lifter_model_call.arch.regs.RSI for loc_key, index in find_call(ircfg): irb = ircfg.get_block(loc_key) @@ -106,7 +106,7 @@ def get_funcs_arg0(ctx, ira, ircfg, lbl_head): print('Analysing references from:', hex(instr.offset), instr) g_list = g_dep.get(irb.loc_key, set([element]), index, set([lbl_head])) for dep in g_list: - emul_result = dep.emul(ira, ctx) + emul_result = dep.emul(lifter_model_call, ctx) value = emul_result[element] yield value @@ -144,14 +144,14 @@ types_mngr = CTypesManagerNotPacked(types_ast, base_types) cont = Container.fallback_container(data, None, addr=0) machine = Machine("x86_64") -dis_engine, ira = machine.dis_engine, machine.ira +dis_engine, lifter_model_call = machine.dis_engine, machine.lifter_model_call mdis = dis_engine(cont.bin_stream, loc_db=loc_db) addr_head = 0 asmcfg = mdis.dis_multiblock(addr_head) lbl_head = loc_db.get_offset_location(addr_head) -ir_arch_a = ira(loc_db) +ir_arch_a = lifter_model_call(loc_db) ircfg = ir_arch_a.new_ircfg_from_asmcfg(asmcfg) open('graph_irflow.dot', 'w').write(ircfg.dot()) |