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

Slides:



Advertisements
Similar presentations
Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem Yuri A. Gubin student of SPb SU ITMO supervised by Anatoly.
Advertisements

C++ Interface for Making Visualized Graphs By N.K. Bonsack and E.Harcourt Abstract Software engineers and computer scientists alike frequently come upon.
LATTICE TECHNOLOGY, INC. For Version 10.0 and later XVL Web Master Advanced Tutorial For Version 10.0 and later.
Reminders and Notes  Your slides are due on October 1 and are final as submitted: Changes past the deadline are only made in cases of significant errors.
An Introduction to Visual Basic
ON TARGET Presenter Name By PresenterMedia.comPresenterMedia.com.
Translations Translations and Getting Ready for Reflections by Graphing Horizontal and Vertical Lines.
2015 Great Plains ASLA Awards Category here Project Name: xxxxxxxxxxxxxxxxxxxxx Project Name: Project Location: Project Purpose: To xxxxxx xxxxxx xxxx.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
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.
Print the sample banner slides or customize with your own message. Click on the letter and type your own text. Use one character per slide. Cut along dotted.
SVG Accessibility Basics
Tracing An Algorithm for Strongly Connected Components that uses Depth First Search Graph obtained from Text, page a-al: Geetika Tewari.
ePosterBoards Template
Add your secondary text & subtitle
2017 Great Plains ASLA Awards Category here
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:
PROGRAMME F10 FUNCTIONS.
Replace Shape with your Logo
Replace Shape with your Logo
VB 6.0.
Sample Presentation. Slide 1 Info Slide 2 Info.
Creating Power Point Presentations
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
Click Here to Add Main Title
Poster template (Single Panel)
Citation Map Visualizing citation data in the Web of Science
Presenter Name/Subtitle
مدل سازی ترافیک شبکه استاد راهنما: دکتر کیارش میزانیان
Reconstruction What goals did policy-makers, ex-Confederates, and freed people pursue during Reconstruction? To what degree did each succeed? By (your.
How to Use the Story Board Layout
Click to add title First level bullet Second level bullet
ePosterBoards Template
How to Use the Story Board Layout
Graphics and FLTK CSCE 121 J. Michael Moore
< DELETE THIS BOX WHEN DONE >
Insert Title Here This template can be used as a guide to help you make more accessible presentations, or you can copy your materials over into this file.
Wire Reference Numbers
АВЛИГАТАЙ ТЭМЦЭХ ҮНДЭСНИЙ ХӨТӨЛБӨР /танилцуулга/
Click to add title First level bullet Second level bullet
Quadratic Graphs.
Flowcharts Some Rules.
XML Parsers.
Telegram style text description:
AIA Florida/Caribbean Magazine Project Submission Template
Click to add title First level bullet Second level bullet
Generating Control-Flow Graph using Open-Source S/W
Affiliations Introduction Discussion Methods Results References
40% CIRCLE INFOGRAPHIC 50% 25% 15% 5%
Click to add title First level bullet Second level bullet
Title in Arial (Bold) 60 Point Font
2016 Title in Arial (Bold) 60 Point Font
… 1 2 n A B V W C X 1 2 … n A … V … W … C … A X feature 1 feature 2
Click to add title First level bullet Second level bullet
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/Category:I mages_with_Dot_source_code digraph finite_state_machine { rankdir=LR; size="8,5" node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; node [shape = circle]; LR_0 -> LR_2 [ label = "SS(B)" ]; LR_0 -> 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 $ 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