~ben-hutchings/ensoft-sextant/file-names

« back to all changes in this revision

Viewing changes to src/sextant/export.py

  • Committer: Tarmac
  • Author(s): Ben Hutchings
  • Date: 2014-10-23 13:01:08 UTC
  • mfrom: (29.1.33 csv-upload)
  • Revision ID: tarmac-20141023130108-696ii2di9conro6d
Programs now upload by first being parsed into csv files, then uploaded from these to the database. This is _significantly_ faster for large programs.

Furthermore, the structure of the program nodes in the database has been changed - whereas before they were unlabelled nodes with type 'program', they are now associated with the 'program' label (the database partitions on label - so this labelling keeps programs distinct from the functions). All queries in sextant have been updated to reflect this.

New module sshmanager handles the ssh connection to the database server.
New module csvwriter deals with the nuts and bolts of the csv files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        font_name = "Helvetica"
47
47
 
48
48
        for func in program.get_functions():
49
 
            if func.type == "plt_stub":
 
49
            if func.type == "stub":
50
50
                output_str += ' "{}" [fillcolor=pink, style=filled]\n'.format(func.name)
51
51
            elif func.type == "function_pointer":
52
52
                output_str += ' "{}" [fillcolor=yellow, style=filled]\n'.format(func.name)
108
108
 
109
109
        for func in program.get_functions():
110
110
            display_func = ProgramConverter.get_display_name(func)
111
 
            if func.type == "plt_stub":
 
111
            if func.type == "stub":
112
112
                colour = "#ff00ff"
113
113
            elif func.type == "function_pointer":
114
114
                colour = "#99ffff"
175
175
                output_str += '<edge source="{}" target="{}"> <data key="calls">1</data> </edge>\n'.format(func.name, callee.name)
176
176
 
177
177
        output_str += '</graph>\n</graphml>'
178
 
        return output_str
 
 
b'\\ No newline at end of file'
 
178
        return output_str