Generating Control-Flow Graph using Open-Source S/W

Slides:



Advertisements
Similar presentations
Visualization of Computer Networks By Richard Zschech Supervisors: Dr. Ken Hawick, Dr. Paul Coddington.
Advertisements

Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem Yuri A. Gubin student of SPb SU ITMO supervised by Anatoly.
C++ Interface for Making Visualized Graphs By N.K. Bonsack and E.Harcourt Abstract Software engineers and computer scientists alike frequently come upon.
Visual Basic.net IDE. Integrated Development Environment.
An Introduction to Visual Basic
Lattice Technology New Product Feature Highlights July 2010 Product Release.
ON TARGET Presenter Name By PresenterMedia.comPresenterMedia.com.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Using Language to Persuade Analysing Visual Texts
Introduction. Introduction Traditional view of a compiler tool to translate high-level (imperative) code into optimized machine code large, complicated.
Diagrammer Takes a GraphML file and displays a diagram from it The following are the meaningful concepts for the diagrammer: – Graph (the graph being displayed)
Title Here (Arial, bold, 36 pts.) Presented to Date (Arial, 20 pts.)
Homework 4 Basic Blocks and Control Flow Graphs CS4430 Spring 2012 Due: April 2 nd by 2pm* * There will be absolutely no extensions for this assignment.
MINING TWITTER 1.7 Visualizing a Graph of Retweet Relationships.
What follows is a complete diagram library of over 300 tables, flows, processes and other concepts waiting for text to be added. Words imply – but pictures.
SVG Accessibility Basics
Your Poster Title Goes Here
ePosterBoards Template
Translating Visual Information into Tactile Information
Cover slide 1 We recommend picking one cover slide from these two options and removing the other from the Master This PowerPoint Template includes a series.
TOP-003 Data Library Detail Design Discussions October 5th, 2016
An introduction with a few examples How it works in theory:
Replace Shape with your Logo
VB 6.0.
Title Slide Title slide: Add notes here..
An Animated PowerPoint Template
Your Goals and Objectives
Click to add title First level bullet Second level bullet
An Animated PowerPoint Template
Constructions and Loci
An Animated PowerPoint Template
Tree Growth Static Add Subtitle Here Your Text Here Your Text Here
Huffman Encoding Visualization
Examples and general guides
Poster template (Single Panel)
Citation Map Visualizing citation data in the Web of Science
Generating Control-Flow Graph using Open-Source S/W
P.J.Balakumaran, AP, Commerce CA, SNMV CAS
Presenter Name/Subtitle
مدل سازی ترافیک شبکه استاد راهنما: دکتر کیارش میزانیان
How to Use the Story Board Layout
Click to add title First level bullet Second level bullet
ePosterBoards Template
Your Poster Title Goes Here
Your Poster Title Goes Here
Your Poster Title Goes Here
How to Use the Story Board Layout
Your Poster Title Goes Here
Your Poster Title Goes Here
Your Poster Title Goes Here
Your Poster Title Goes Here
Wire Reference Numbers
АВЛИГАТАЙ ТЭМЦЭХ ҮНДЭСНИЙ ХӨТӨЛБӨР /танилцуулга/
Click to add title First level bullet Second level bullet
Your Poster Title Goes Here
Your Poster Title Goes Here
XML Parsers.
Telegram style text description:
Click to add title First level bullet Second level bullet
Affiliations Introduction Discussion Methods Results References
40% CIRCLE INFOGRAPHIC 50% 25% 15% 5%
Overlapping Circles Diagram
Click to add title First level bullet Second level bullet
Title in Arial (Bold) 60 Point Font
Your Poster Title Goes Here
2016 Title in Arial (Bold) 60 Point Font
Click to add title First level bullet Second level bullet
Your Poster Title Goes Here
Click to add title First level bullet Second level bullet
Click to add title First level bullet Second level bullet
Presentation transcript:

Generating Control-Flow Graph using Open-Source S/W GCC: version 4.8+ (recommend 5.x+) Graphviz (for processing .dot file) The original slides were made by Hyunsu Lim bookman01@kaist.ac.kr

Get the target .c file Sample .c file that will be used: sample.c

Generate .dot file using gcc $ gcc -fdump-tree-all-graph <target.c> Or $ gcc -fdump-tree-all-graph-lineno <target.c> For more detailed options, https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html

DOT (graph description language) DOT is a plain text graph description language ( *.gv or *.dot) The DOT language defines a graph, but not layout of the graph. Graphviz –libraries and utilities to manipulate graphs http://www.webgraphviz.com/ https://commons.wikimedia.org/wiki/Catego ry:Images_with_Dot_source_code digraph finite_state_machine { rankdir=LR; size="8,5" node [shape = doublecircle]; “LR_0 def{x}” LR_3 LR_4 LR_8; node [shape = circle]; "LR_0 def{x}" -> LR_2 [ label ="SS(B)" ]; "LR_0 def{x}" -> LR_1 [ label = "SS(S)" ]; LR_1 -> LR_3 [ label = "S($end)" ]; LR_2 -> LR_6 [ label = "SS(b)" ]; LR_2 -> LR_5 [ label = "SS(a)" ]; LR_2 -> LR_4 [ label = "S(A)" ]; LR_5 -> LR_7 [ label = "S(b)" ]; LR_5 -> LR_5 [ label = "S(a)" ]; LR_6 -> LR_6 [ label = "S(b)" ]; LR_6 -> LR_5 [ label = "S(a)" ]; LR_7 -> LR_8 [ label = "S(b)" ]; LR_7 -> LR_5 [ label = "S(a)" ]; LR_8 -> LR_6 [ label = "S(b)" ]; LR_8 -> LR_5 [ label = "S(a)" ]; }

Process .dot file using Graphviz You can use http://www.webgraphviz.com/ to generate visual graph from .dot file. Or $ dot -Tpng <target.dot> -o <output.png> <target.dot> file is the file that ends with .cfg.dot In sample case, it is `sample.c.011t.cfg.dot`

Result graph image Warning: Gcc 4.x may generate only cfg of the last function in a taraget C file