forked from OpenSDV/Linux_Kernel_map4vehicle
write_dot
This commit is contained in:
parent
2f0b459830
commit
cc3fb89ef7
|
@ -18,6 +18,7 @@ import collections
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import networkx as nx
|
import networkx as nx
|
||||||
|
from networkx.drawing.nx_agraph import write_dot
|
||||||
|
|
||||||
black_list = ['aligned', '__attribute__', 'unlikely', 'typeof', 'u32',
|
black_list = ['aligned', '__attribute__', 'unlikely', 'typeof', 'u32',
|
||||||
'PVOP_CALLEE0', 'PVOP_VCALLEE0', 'PVOP_VCALLEE1', 'if',
|
'PVOP_CALLEE0', 'PVOP_VCALLEE0', 'PVOP_VCALLEE1', 'if',
|
||||||
|
@ -282,6 +283,12 @@ def syscalls():
|
||||||
return sc
|
return sc
|
||||||
|
|
||||||
|
|
||||||
|
# DiGraph
|
||||||
|
# write_dot to_agraph AGraph
|
||||||
|
# agwrite
|
||||||
|
# srcxray.py 'write_dot(syscalls(), "syscalls.dot")'
|
||||||
|
|
||||||
|
|
||||||
def digraph_print(dg):
|
def digraph_print(dg):
|
||||||
def digraph_print_sub(node=None, printed=None, level=0):
|
def digraph_print_sub(node=None, printed=None, level=0):
|
||||||
outs = [_ for _ in dg.successors(node)]
|
outs = [_ for _ in dg.successors(node)]
|
||||||
|
|
Loading…
Reference in New Issue