diff options
| author | Ajax <commial@gmail.com> | 2015-12-04 18:46:48 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-12-07 11:15:43 +0100 |
| commit | 308a634b7c2c20692e85f5b72178e00d072b7bcd (patch) | |
| tree | 3e091aef76acdf18d6592c2a058345d87489227b /example/ida | |
| parent | 42d4998c1646e48fd9cb150d1aa0e9970b5717c8 (diff) | |
| download | focaccia-miasm-308a634b7c2c20692e85f5b72178e00d072b7bcd.tar.gz focaccia-miasm-308a634b7c2c20692e85f5b72178e00d072b7bcd.zip | |
IR: replace `.g` with a lazy built `.graph`, avoiding the need of `gen_graph`
Diffstat (limited to 'example/ida')
| -rw-r--r-- | example/ida/depgraph.py | 3 | ||||
| -rw-r--r-- | example/ida/graph_ir.py | 4 |
2 files changed, 1 insertions, 6 deletions
diff --git a/example/ida/depgraph.py b/example/ida/depgraph.py index 03eea3d5..406f7200 100644 --- a/example/ida/depgraph.py +++ b/example/ida/depgraph.py @@ -136,9 +136,6 @@ for irb in ir_arch.blocs.values(): for i, expr in enumerate(irs): irs[i] = m2_expr.ExprAff(expr_simp(expr.dst), expr_simp(expr.src)) -# Build the IRA Graph -ir_arch.gen_graph() - # Get settings settings = depGraphSettingsForm(ir_arch) settings.Execute() diff --git a/example/ida/graph_ir.py b/example/ida/graph_ir.py index ba5b29c4..b181f72a 100644 --- a/example/ida/graph_ir.py +++ b/example/ida/graph_ir.py @@ -138,8 +138,7 @@ for irb in ir_arch.blocs.values(): for i, expr in enumerate(irs): irs[i] = ExprAff(expr_simp(expr.dst), expr_simp(expr.src)) -ir_arch.gen_graph() -out = ir_arch.graph() +out = ir_arch.graph.dot() open(os.path.join(tempfile.gettempdir(), 'graph.dot'), 'wb').write(out) @@ -197,7 +196,6 @@ def get_modified_symbols(sb): def gen_bloc_data_flow_graph(ir_arch, in_str, ad): # arch, attrib, pool_bin, bloc, symbol_pool): out_str = "" - ir_arch.gen_graph() # ir_arch.dead_simp() irbloc_0 = None |