diff options
Diffstat (limited to 'example/symbol_exec/depgraph.py')
| -rw-r--r-- | example/symbol_exec/depgraph.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py index c1d6174d..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)) @@ -74,14 +74,14 @@ dg = DependencyGraph(ir_arch, implicit=args.implicit, # Build information target_addr = int(args.target_addr, 0) current_block = list(ir_arch.getby_offset(target_addr))[0] -line_nb = 0 -for line_nb, assignblk in enumerate(current_block.irs): +assignblk_index = 0 +for assignblk_index, assignblk in enumerate(current_block): if assignblk.instr.offset == target_addr: break # Enumerate solutions json_solutions = [] -for sol_nb, sol in enumerate(dg.get(current_block.label, elements, line_nb, set())): +for sol_nb, sol in enumerate(dg.get(current_block.label, elements, assignblk_index, set())): fname = "sol_%d.dot" % sol_nb with open(fname, "w") as fdesc: fdesc.write(sol.graph.dot()) |