Commit 4878ccea authored by Carsten Emde's avatar Carsten Emde
Browse files

Graphviz (the dot program) does not accept dots in digraph name, now

replaced by dashes. Optimized target search loop a bit
parent f75a5e56
...@@ -92,29 +92,28 @@ def createoutput(outputdir, outputformat, machine_to_binary, linked_libraries, ...@@ -92,29 +92,28 @@ def createoutput(outputdir, outputformat, machine_to_binary, linked_libraries,
for o in machine_to_binary[architecture]: for o in machine_to_binary[architecture]:
for endian in machine_to_binary[architecture][o]: for endian in machine_to_binary[architecture][o]:
for elfclass in machine_to_binary[architecture][o][endian]: for elfclass in machine_to_binary[architecture][o][endian]:
for filename in machine_to_binary[architecture][o][endian][elfclass]: if target in machine_to_binary[architecture][o][endian][elfclass]:
if filename == target: if target_architecture == '':
if target_architecture == '': target_architecture = architecture
target_architecture = architecture else:
else: if architecture != target_architecture:
if architecture != target_architecture: print("Info: Architecture of target %s (%s) is different from architecture of first target (%s)" % (target, architecture, target_architecture))
print("Info: Architecture of target %s (%s) is different from architecture of first target (%s)" % (target, architecture, target_architecture)) if target_machine == '':
if target_machine == '': target_machine = o
target_machine = o else:
else: if o != target_machine:
if o != target_machine: print("Info: Machine of target %s (%s) is different from machine of first target (%s)" % (target, o, target_machine))
print("Info: Machine of target %s (%s) is different from machine of first target (%s)" % (target, o, target_machine)) if target_endian == '':
if target_endian == '': target_endian = endian
target_endian = endian else:
else: if endian != target_endian:
if endian != target_endian: print("Info: Endian of target %s (%s) is different from endian of first target (%s)" % (target, endian, target_endian))
print("Info: Endian of target %s (%s) is different from endian of first target (%s)" % (target, endian, target_endian)) if target_elfclass == '':
if target_elfclass == '': target_elfclass = elfclass
target_elfclass = elfclass else:
else: if elfclass != target_elfclass:
if elfclass != target_elfclass: print("Info: Elfclass of target %s (%s) is different from elfclass of first target (%s)" % (target, elfclass, target_elfclass))
print("Info: Elfclass of target %s (%s) is different from elfclass of first target (%s)" % (target, elfclass, target_elfclass)) raise StopIteration
raise StopIteration
except StopIteration: except StopIteration:
pass pass
...@@ -205,7 +204,7 @@ def createoutput(outputdir, outputformat, machine_to_binary, linked_libraries, ...@@ -205,7 +204,7 @@ def createoutput(outputdir, outputformat, machine_to_binary, linked_libraries,
outputfileopen.write("<graph defaultedgetype=\"directed\" idtype=\"string\" type=\"static\">\n") outputfileopen.write("<graph defaultedgetype=\"directed\" idtype=\"string\" type=\"static\">\n")
outputfileopen.write("<nodes>\n") outputfileopen.write("<nodes>\n")
elif outputformat == 'gv': elif outputformat == 'gv':
outputfileopen.write("digraph " + os.path.basename(limitsearch[0]) + " {\n ratio=0.562;\n") outputfileopen.write("digraph " + os.path.basename(limitsearch[0]).replace('.', '-') + " {\n ratio=0.562;\n")
if fontname is not None: if fontname is not None:
outputfileopen.write(" graph [fontname=\"" + fontname + "\"];\n") outputfileopen.write(" graph [fontname=\"" + fontname + "\"];\n")
outputfileopen.write(" node [fontname=\"" + fontname + "\"];\n") outputfileopen.write(" node [fontname=\"" + fontname + "\"];\n")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment