about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2011-10-03 09:02:52 +0200
committerserpilliere <devnull@localhost>2011-10-03 09:02:52 +0200
commit18902bb5f758e9c6a1b183f0b4a4f08c3d825f5f (patch)
tree45a33679a15a8d842a1fda0f4cc12684db7b06ae
parent0eae576c12e0a20a49466ce4e934e156f036c5d5 (diff)
downloadmiasm-18902bb5f758e9c6a1b183f0b4a4f08c3d825f5f.tar.gz
miasm-18902bb5f758e9c6a1b183f0b4a4f08c3d825f5f.zip
use simple grandalf interface (Thx cpt igloo)
-rw-r--r--miasm/core/asmbloc.py3
-rwxr-xr-xmiasm/graph/graph_qt.py15
2 files changed, 5 insertions, 13 deletions
diff --git a/miasm/core/asmbloc.py b/miasm/core/asmbloc.py
index 462b03d7..565ad637 100644
--- a/miasm/core/asmbloc.py
+++ b/miasm/core/asmbloc.py
@@ -239,7 +239,8 @@ def dis_bloc(mnemo, pool_bin, cur_bloc, offset, job_done, symbol_pool, dont_dis
 
         try:
             instr = mnemo.dis(pool_bin, amode, sex)
-        except:
+        except StandardError, e:
+            log_asmbloc.warning(e)
             instr = None
 
         if instr == None:
diff --git a/miasm/graph/graph_qt.py b/miasm/graph/graph_qt.py
index c9e71683..c505e682 100755
--- a/miasm/graph/graph_qt.py
+++ b/miasm/graph/graph_qt.py
@@ -736,19 +736,10 @@ class MainWindow(QtGui.QWidget):
         for index in xrange(len(g.C)):
 
             gr = g.C[index]
-            if False:#dr  and hdr in g.C[index].sV:
-                r = [hdr]
-            else:
-                r = filter(lambda x: len(x.e_in())==0, gr.sV)
-                if not r:
-                    print 'no roots!'
-                    r = [gr.sV.o[0]]
-            r.sort()
-            L = g.C[index].get_scs_with_feedback(r)
-            sug = SugiyamaLayout(g.C[index])
+            sug = SugiyamaLayout(gr)
             sug.xspace = 40
             sug.yspace = 40
-            sug.init_all(roots=r,inverted_edges=filter(lambda x:x.feedback, g.C[index].sE))
+            sug.init_all()
             sug.route_edge = route_with_splines
             sug.draw(1)
 
@@ -759,7 +750,7 @@ class MainWindow(QtGui.QWidget):
                 if min_pos_x == None or pos[0] - n.view.w/2 < min_pos_x:
                     min_pos_x = pos[0]- n.view.w/2
 
-            first_pos = r[0].view.xy
+            first_pos = sug.layers[0][0].view.xy
             new_max_pos_x = max_pos_x
             #first_pos = None
             for n in g.C[index].sV: